Saturday, June 4, 2016

PHP Laravel : Important Artisan Command




artisan command


1. For Generating Migrated Database.It will automatically generate User table in databaseafter fresh installation of Laravel

php artisan migrate

2. For Installing composer in the required project or the project you have downloaded from the git repository.

composer install

3. For Updating Composer in Laravel Project. (Mostly required when we install a new package in existing project)

composer update

4. For Creating table in database. (Here I'm creating option table).

php artisan make:migration create_option_table

5. For generating unique key/ product key in your laravel project.

php artisan key:generate

6. For making New Controller in your Laravel Project. (Here I'm making TodoController)

php artisan make:controller TodoController

7. For Creating New Model in your project.( Here I'm creating Task Model )

php artisan make:model Task

8. For Creating Model as well as Table. ( Here I'm creating Task Model and tasks table with the below command)

php artisan make:model Task -m

9. Laravel provides a quick way to generate all of the routes and views you need for authentication by below command:

php artisan make:auth

10. For showing all the artisan command

php artisan

11. For listing out the routes you have used in your project:

php artisan route:list

12. For createting Event and listener we can use following command:

php artisan event:generate

Related Articles

0 comments:

Post a Comment