Home / Snippets / How to clear Route cache in Laravel 8
How to clear Route cache in Laravel 8 cover

How to clear Route cache in Laravel 8

367

3 years ago

0 comments

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

notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

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

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this