0
0
Laravelframework~10 mins

Route caching 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 cache the routes in a Laravel application.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Acache:clear
Broute:cache
Cconfig:cache
Droute:list
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache:clear' instead of 'route:cache'.
Confusing route caching with config caching.
2fill in blank
medium

Complete the code to clear the route cache in Laravel.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Aroute:cache
Bcache:clear
Croute:clear
Dconfig:clear
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache:clear' which clears all caches, not just routes.
Using 'route:cache' which caches routes instead of clearing.
3fill in blank
hard

Fix the error in the artisan command to cache routes by completing the missing part.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Aroute:cache
Broute:list
Ccache:clear
Dconfig:cache
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'route:list' which only lists routes.
Using 'cache:clear' which clears caches instead of caching.
4fill in blank
hard

Fill both blanks to create a route cache command with a specific environment in Laravel.

Laravel
php artisan [1] --env=[2]
Drag options to blanks, or click blank then click option'
Aroute:cache
Broute:clear
Cproduction
Dlocal
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'route:clear' instead of 'route:cache'.
Using 'local' environment instead of 'production' for caching.
5fill in blank
hard

Fill all three blanks to create a command that caches routes and clears config cache in Laravel.

Laravel
php artisan [1] && php artisan [2] && php artisan [3]
Drag options to blanks, or click blank then click option'
Aroute:cache
Bconfig:clear
Croute:clear
Dconfig:cache
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'config:clear' and 'config:cache'.
Using 'cache:clear' which clears all caches.