Sep.10

Laravel Useful Command

Create Model Command:

php artisan make:model Flight
php artisan make:model <folder_path>/Flight

Model With Database Migration

php artisan make:model <folder>/Flight -m

Create Seeder Database

php artisan make:seeder ModelNameSeeder          <modelName>

Run Migration

Run Specif file with defining Path::

php artisan migrate --path=/database/migrations/my_migration.php

Run DB Seed

php artisan db:seed                         ---> Run Full Seeder 

php artisan db:seed --class=UserSeeder      ---> Run Specific Seeder <user>

php artisan migrate:fresh --seed            ---> Run Migration with Seeder

php artisan db:seed --force                 ---> Force Full Seeing db
Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment