Archive for the ‘laravel’ Category

Creating Laravel Package

If you already have Laravel move to Step 2 Step 1. Get Laravel composer create-project –prefer-dist laravel/laravel . Step 2. Create following folder structure: mkdir -p packages/aghayevi/modulename/src Step 3. Do the following cd packages/aghayev/modulename composer init   This command will guide you through creating your composer.json config.   Package name (<vendor>/<name>) [root/modulename]: aghayevi/modulename Description []: […]

Laravel install particular version

composer create-project laravel/laravel myproject 5.1

Laravel new console command

1. Create php artisan make:command MyApp –command=myapp:perform 2. Edit vi app/Console/Commands/MyApp.php …. /** * Execute the console command. * * @return mixed */ public function handle() { echo ‘My App’; } 3. Run php artisan myapp:perform

Laravel last query raw output

<?php   dd(\DB::getQueryLog());

Laravel db migration commands

php artisan migrate php artisan migrate:rollback