0
0
Laravelframework~10 mins

Artisan CLI overview in Laravel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run the Artisan command that lists all available commands.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Alist
Bserve
Cmake:model
Dmigrate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'serve' instead of 'list' to see commands
Trying 'make:model' which creates a model, not lists commands
2fill in blank
medium

Complete the code to start the Laravel development server using Artisan.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Amigrate
Bconfig:cache
Ccache:clear
Dserve
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'migrate' which runs database migrations
Using 'cache:clear' which clears cache but doesn't start server
3fill in blank
hard

Fix the error in the Artisan command to create a new controller named 'UserController'.

Laravel
php artisan [1] UserController
Drag options to blanks, or click blank then click option'
Amake:seeder
Bmake:controller
Cmake:migration
Dmake:model
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'make:model' which creates a model, not a controller
Using 'make:migration' which creates a database migration
4fill in blank
hard

Fill both blanks to clear the application cache and then cache the configuration.

Laravel
php artisan [1] && php artisan [2]
Drag options to blanks, or click blank then click option'
Acache:clear
Bconfig:cache
Croute:cache
Dview:clear
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the order of commands
Using 'route:cache' instead of 'config:cache'
5fill in blank
hard

Fill all three blanks to create a new migration file, run migrations, and rollback the last migration.

Laravel
php artisan [1] create_users_table && php artisan [2] && php artisan [3]
Drag options to blanks, or click blank then click option'
Amake:migration
Bmigrate
Cmigrate:rollback
Ddb:seed
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'db:seed' which seeds data, not migrations
Mixing order of migrate and rollback commands