Artisan is the command-line interface included with Laravel. It provides a number of helpful commands that can assist you while you build your application. To view a list of all available Artisan commands, you may use the list command:
Laravel create controller
php artisan make:controller UserController php artisan make:controller CategoriesController --resource php artisan make:controller Blog/PostsController
Laravel create component
php artisan make:component Header
laravel new project_name php artisan serve php artisan make:auth php artisan route:list php artisan migrate:refresh php artisan migrate:refresh --seed composer require laravel/ui php artisan ui vue --auth Model With Migration php artisan make:model Post -m php artisan make:model Category -m php artisan route:clear php artisan optimize php artisan up php arisan down php artisan config:cache php artisan migrate:rollback php artisan migrate --path=/database/migrations/2019_10_06_052849_create_categories_table.php php artisan help migrate php artisan make:request CreateCategoryRequest php artisan make:request Categories/CreateCategoryRequest php artisan storage:link php artisan make:migration create_post_tag_table --table=post_tag php artisan cache:clear php artisan make:resource CategoriesResource php artisan make:middleware VerifyCategoriesCount php artisan tinker >>> User::all(); >>> exit composer update php artisan make:seeder PostsTableSeeder php artisan migrate:refresh --seed php artisan vendor:publish > 13
Command | Description |
laravel new project_name | |
php artisan serve | |
php artisan make:auth | |
php artisan route:list | |
php artisan migrate:refresh | |
php artisan migrate:refresh –seed | |
composer require laravel/ui | |
php artisan ui vue –auth | |
Model With Migration | |
php artisan make:model Post -m | |
php artisan make:model Category -m | |
php artisan migrate:rollback | |
php artisan migrate –path=/database/migrations/2019_10_06_052849_create_categories_table.php | |
php artisan help migrate | |
php artisan make:request CreateCategoryRequest | |
php artisan make:request Categories/CreateCategoryRequest | |
php artisan storage:link | |
php artisan make:migration create_post_tag_table –table=post_tag | |
php artisan cache:clear | |
php artisan make:middleware VerifyCategoriesCount | |
php artisan tinker User::all(); exit |
|
php artisan make:seeder PostsTableSeeder | |
php artisan migrate:refresh –seed | |
php artisan make:factory ModelFactory | |
php artisan make:seed ProductsTableSeeder | |
composer require laravel/ui | |
php artisan ui vue –auth |