Posts Learn Components Snippets Categories Tags Tools About
/

How to clear Route cache in Laravel 8

Learn how to clear your route cache and to allow new route changes to take effect on the front end

Created on Oct 26, 2021

290 views

In this short snippet, you will learn how to clear your route cache and to allow new route changes to take effect on the front end.

Laravel Clear Route Cache


To clear the route cache you can make use of the artisan command.
php artisan route:clear
Running the command above will clear all of your route caches and any new route that you have just defined will be accessible from within the URL.

Running Route Clear Programmatically in Laravel


To call this route clear you can programmatically call the artisan command from your code.
Artisan::command('route:clear')

How to Cache Laravel Route?


To cache Laravel route you can make use of the "route:cache" command.
php artisan route:cache

Other Reads

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

Load comments for How to clear Route cache in Laravel 8

)