First of all get some proper version control like git which is free.
You can try running php artisan view:clear to clear all cached views.
Hi I copied a whole Laravel project folder to a new one: old_project to new_project (as I did a lot of times to keep versioning). But now after that any changes to new project Laravel Blade template files are not update/showed.
I tried to delete cache and also manually to delete storage/framework/views/* files but not matter what i have done. I continue to see old files and no updated files. Why?
Thank you
First of all get some proper version control like git which is free.
You can try running php artisan view:clear to clear all cached views.
I tried to clear cache and any other tricks told here: https://stackoverflow.com/questions/37503627/blade-view-not-reflecting-changes but as I said nothing changed. I continue to see old files also if I applied change on blade template files.
Perhaps your domain name/ server instance is not pointing to the code base that you think it is?
I'm testing all stuff with local server: php artisan serve --host=127.0.0.1 --port=8080
Any advice? I read it should be a problem of different timestamp. But I don't found a solution...
If you deleted all the cached view files, how can it show old content? Perhaps you did not update the project at all.
Yes there can be a time issue if the view you create has an older timestamp than the cached file - but you say that you deleted the cache?
Perhaps you have another process of php artisan serve left running on port 8080 and your new process started on another port. So you are seeing old files served perhaps from a previous project.
Rename one of the file name and try to access it, if you did not see the 404, most likely something wrong at your setup, or add a new route to a test blade page. By the way, what had you change that not update? CSS style?
Use below commands and check,
npm run dev
else
npm run watch
I continue to be unable to modify files. That is what I do:
My new mods are not showed and I continue to see old data. When I did point #4 I got message views were cleared but there were still a lot o cached views in "/storage/framework/views" so I deleted them by myself.
And if I delete my view "test.blade.php" I continue to see page instead 404 error.
Any advice? I read there could be some problem with PHP's opcache module. Is that the case?
Thank you
Do you have another web server running (pointing at the old code)
if you don't run php artisan serve do you get any content in your browser?
Snapey I have not an other web server. I'm just using php artisan server one as I always done during development.
Did you ever composer dumpautoload
May need to delete the composer lock file, delete vendor folder and do another composer update, or composer install.
@jlrdw this worked for me, thank you!
double check your route whether you are accessing the right url to a right view?
I tried also as suggested:
But no changes. I continue to see old files content instead new one...
Comment out the route you are testing then refresh the page. Do you get content or 404
I commented that route and I got 404.
show the codes and screenshots... all are just purely your words... it's hard to believe as it's very odd the chance to have this happen is almost 0.
suggest you that screenshot (better don't crop, fullscreen shot of what you running) the actual step by step what you did and what actually happened will help folks to understand your issue more clearly....
Hello, I know its too late, but I faced same problem, too, and I found the problem just as your operation, and after I run some php artisan command, I found I cannot reach the folder of views(permission denial) so I changed my views owner by Linux commad: sudo chown youraccount:youraccount, and youraccount means your system login username( Linux, Ubuntu, CentOS username, etc). and after changed the permission of the folder, I can delete files of views by 'php artisan view:clear'. By the way, I found I cannot run my web page after that, so I changed my views permission to 0777( I have tested 0755, but it is not working). Let me sum up: Change the owner( to your system username) and permission(0777) of views folder. Hope it can help others who faced same problem, good luck!
Please or to participate in this conversation.