Reputation: 220
I have changed file in Laravel public folder, but when I try to download using link, it downloads old file. I have tried:
php artisan cache:clear
php artisan route:cache
php artisan view:clear
php artisan config:cache
But without any success. Can someone help me?
Upvotes: 0
Views: 4191
Reputation: 11
If you´re using artisan
as server try to stop and restart it.
Also you should try to reload the page by CTRL + F5
or CTRL + SHIFT + R
which ignores the local browser cache.
Upvotes: 0
Reputation: 209
It's because of your browser cache not blade cache.
Add a random number or better than that, the current time after the download links. like:
return $download_links . '?' . time();
Upvotes: 0
Reputation: 703
It might be your browser that's caching the file. Try download it again in a different browser or try in Incognito or Private Browsing mode to test it. I've had this same thing happen to me today actually and turns out the browser cached the file and kept reloading that file even after it was deleted from the server!
Upvotes: 5