Laravel 5 Clear Views Cache

To clear the cache for your views in Laravel 5, you can use the view:clear Artisan command.

To run the command, you can use the following syntax:

php artisan view:clear

This will clear the cache for your views, which will recompile the views on the next request.

Watch a course Learn object oriented PHP

You can also clear the cache for a specific view by specifying the view name as an argument:

php artisan view:clear myview

This will clear the cache for the view myview.

Note that this command will only work if you have enabled view caching in your Laravel application. View caching is disabled by default. To enable it, you can set the CACHE_DRIVER configuration option in your .env file to array:

CACHE_DRIVER=array

You can also enable view caching by setting the CACHE_DRIVER option in your config/view.php configuration file.