Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to cache the configuration in Laravel.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'route:cache' instead of 'config:cache'.
Trying to clear cache instead of caching config.
✗ Incorrect
The command 'php artisan config:cache' caches the configuration files for faster loading.
2fill in blank
mediumComplete the code to clear the configuration cache in Laravel.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache:clear' which clears all caches, not just config.
Using 'config:cache' which caches instead of clearing.
✗ Incorrect
The command 'php artisan config:clear' clears the configuration cache.
3fill in blank
hardFix the error in the command to cache config by replacing the wrong part.
Laravel
php artisan [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache:clear' which clears all caches.
Using 'route:cache' which caches routes, not config.
✗ Incorrect
The correct command to cache config is 'config:cache'.
4fill in blank
hardFill both blanks to create a command that caches config and then clears route cache.
Laravel
php artisan [1] && php artisan [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'route:cache' instead of 'route:clear' for the second command.
Clearing cache before caching config.
✗ Incorrect
First cache config with 'config:cache', then clear route cache with 'route:clear'.
5fill in blank
hardFill all three blanks to run commands that clear config cache, cache config, and then clear view cache.
Laravel
php artisan [1] && php artisan [2] && php artisan [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Running 'config:cache' before clearing config cache.
Using 'cache:clear' instead of 'view:clear' for clearing views.
✗ Incorrect
Clear config cache first, then cache config, and finally clear view cache.