Is there a proper explanation as to why when I'm either pulling the complete project from the server, or pushing it on server, views don't get updated? I always have to manually go to the resources folder and transfer views after everything has already uploaded/downloaded.
Asked
Active
Viewed 851 times
0
-
have try cleaning the views cache ? – Gntem Apr 13 '17 at 07:56
-
so you mean that files actually do get uploaded, but the cache is pulling old versions? Why would it work then when I manually upload it without clearing the cache? – Norgul Apr 13 '17 at 07:57
-
I think it checks that the file has been modified and rerenders the cached view. Or you skip uploading the views directory in the first upload. – Gntem Apr 13 '17 at 07:59
-
Yeah, but how is uploading everything different than uploading a single folder? It should get rewritten in both cases – Norgul Apr 13 '17 at 08:03
-
Because when caching is set to the file system(default). The caching of the views is litterly stored in files. So when you upload everything you upload the old cache. This also might help : http://stackoverflow.com/questions/31455829/laravel-5-clear-cache-in-shared-hosting-server – Christophvh Apr 13 '17 at 11:33
1 Answers
0
The solution is to clear your cache like stated in the comments.
php artisan view:clear
The reason why this is happening is because by default the caching is set to File. Which means that the view-cache is stored in files. When you upload everything the old-cache is uploaded. The files are stored in storage\framework\views
If you upload a single folder, laravel notices a change and the cache is busted.
PS: it is recommended that you use git for this kind of stuff, Laravel has .gitignore files to prevent this kind of behavior.

Christophvh
- 12,586
- 7
- 48
- 70