Package Data | |
---|---|
Maintainer Username: | acacha |
Maintainer Contact: | sergiturbadenas@gmail.com (Sergi Tur Badenas) |
Package Create Date: | 2016-02-04 |
Package Last Update: | 2018-05-29 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:26:47 |
Package Statistics | |
---|---|
Total Downloads: | 25,994 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 108 |
Total Watchers: | 7 |
Total Forks: | 13 |
Total Open Issues: | 20 |
Speed up you Github/Laravel development workflow illuminating packages with llum:
Now supports Laravel 5.4.
See also:
composer global require "acacha/llum=~1.0"
Some commands use bash commands like GNU sed and touch.On Windows you can use CygWin or see StackOverflow
On MAC OS use GNU sed instead of default installed BSD sed
brew install gnu-sed --with-default-names
Execute:
llum init
Please enter your github username (sergi) ?
Do you want to use our assistant to obtain token via Github API (Y/n)?Y
Github password?
To configure your Bithub user and obtain a token to interact with github using llum commands (see github command section below). This command creates file ~/.llumrc
, an example:
~ cat .llumrc
; Llum configuration file
[github]
username = acacha
token = token_here
token_name = your token name here
You can avoid providing password creating manually this file an putting your personal Github acces token (https://github.com/settings/tokens) on ~/.llumrc
file.
IMPORTANT: Requires previous execution of llum init
command to work.
IMPORTANT: Requires previous execution of llum init
command to work.
This commands initializes a Github repo, create a first commit, create a Github repo and syncs local content with Github repo. The commands executed are:
git init
git add .
git commit -a -m "Initial version"
llum github:repo
git pull origin master
git push origin master
Example:
$ cd myproject
$ llum github:init
Running command git init...
S'ha inicialitzat un buit dipòsit de Git a /home/sergi/myproject/.git/
Running command git add ....
Running command git commit -a -m "Initial version"...
[master (comissió d'arrel) 563473d] Initial version
1 file changed, 0 insertions(+), 0 deletions(-)
...
Running command llum github:repo...
Repository myproject created
Running command git remote add origin git@github.com:acacha/myproject.git...
Running command git pull origin master...
fatal: Couldn't find remote ref master
Running command git push origin master...
Comptant els objectes: 3, fet.
Escrivint els objectes: 100% (3/3), 216 bytes | 0 bytes/s, fet.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:acacha/myproject.git
* [new branch] master -> master
IMPORTANT: Requires previous execution of llum init
command to work.
Create a new Github repo:
mkdir && cd newrepo
llum github:repo
This create a new Github repo called {yourgithubusername}/newrepo
(the current folder name is used) . You can provide a name for the repo with:
llum github:repo reponame
Execute commands:
And your are ready to go!
Install and configure amazing debug tools Laravel Debugbar and Laravel-ide-helper
llum devtools
You can install only Laravel Debugbar devtool with:
llum debugbar
You can install only Laravel-ide-helper devtool with:
llum idehelper
Once you've installed a new laravel project use sqlite command to active sqlite
laravel new larapp
cd larapp
llum sqlite
File database/database.sqlite created successfully
.env file updated successfully
And sqlite is ready to go:
php artisan migrate
Migration table created successfully.
Migrated: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_100000_create_password_resets_table
Add a provider to config/app.php file:
llum provider Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class
Add an alias/Facade to config/app.php file:
llum alias Socialite Laravel\Socialite\Facades\Socialite::class
Similar to php artisan serve but some enhacements:
llum serve
Running php artisan serve --port=8002
Opening http://localhost:8002 with default browser
Runs php artisan migrate
llum migrate
https://packagist.org/packages/acacha/admin
Acacha llum need GNU sed to work so replace BSD sed with GNU sed using:
brew install gnu-sed --with-default-names
Check you version of sed with:
man sed
sed GNU version path is:
$ which sed
/usr/local/bin/sed
Instead of default path of BSD sed (installed by default on MAC OS):
/usr/bin/sed
More info at https://github.com/acacha/adminlte-laravel/issues/58
Update value in .env file with sed:
sed -i '/^MAIL_DRIVER=/s/=.*/=log/' .env
Comment database entries:
sed -i 's/^DB_/#DB_/g' .env
Add sqlite before database entries:
sed 's/.*DB_HOST.*/DB_CONNECTION=sqlite\n&/' .env
Artisan serve always working:
Solution with php preg_replace function:
file_put_contents(base_path('.env'), preg_replace("/(MAIL_DRIVER)=(.*)/", "$1=log", file_get_contents(base_path('.env'))));
Insert provider in config/app.php file:
sed '/.*#llum_providers.*/a \\tBarryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class,\n' config/app.php