Reputation: 1179
I've been working on different projects with laravel 8 and the 'problem' (if it is really a problem) is that for every change I made on routes/web.php
I have to route:cache
every freaking time.
If I make a change and route:list
, the new changes will not be displayed.
Is this thing correct or is there any bug? If so is there any way not to route:cache
or route:clear
for every change that is made on web.php
?
Thank you! happy coding!
Upvotes: 2
Views: 6002
Reputation: 136
php artisan route:clear
This will clear your route cache and allow you to freely make updates to your routes file without needing to recache. In development, you should not be caching anything.
Upvotes: 10
Reputation: 5721
If you're using vagrant/homestead combo check the date on your machine, if I go on standby for a few hours the time seems to drift.
So any changes I was making to routes, wasn't being picked up and the only thing that would clear it was route:clear
or config:clear
Restarting machine worked but also a vagrant halt
& vagrant up
might work too.
Upvotes: 0