Search code examples
laravelcachingrouter

Why do I need to clear the router cache after changing route to take effect


Why do I need to clear the router cache after changing route to take effect. In a tutorial, a tutor was changing the route and it was taking effect without clearing the cache.


Solution

  • you should clear all cache at once first using

    php artisan optimize:clear