I added a .blade.php file and modified a controller and javascript file in my laravel project. I'm unable to see the changed on the server(localhost). Is there a command to update/refresh the project ?
Asked
Active
Viewed 1.8k times
4 Answers
8
Try this:
php artisan view:clear
This will clear all compiled view files
Or other command that you can see by using:
php artisan list
Disable browser cache: Disabling Chrome cache for website development
-
I triedview:clear but it does't work, my javascript code is not working.But if I copy paste the code into console it works. – Golden_flash Jun 17 '16 at 04:33
-
Are you getting old blade view or js or js which is in blade view? – weigreen Jun 17 '16 at 04:34
-
The view is linked to js, the js code is responsible to addClass('active') to a component.But the code doesn't work.If i paste it in console it works. – Golden_flash Jun 17 '16 at 04:36
-
What is your **doesn't work**? any error or work fine but running old code? – weigreen Jun 17 '16 at 04:37
-
yes old code is running,the new js file is not loaded – Golden_flash Jun 17 '16 at 04:38
-
OK, your problem maybe is that browser caching old script. Try to disable browser cache for debugging – weigreen Jun 17 '16 at 04:39
-
Have you close all incognito windows and reopen? – weigreen Jun 17 '16 at 04:53
-
yes, i have tried it.Somehow the old js file is loaded and not the new one – Golden_flash Jun 17 '16 at 04:56
-
The problem was with the directory structure where the js file existed. – Golden_flash Jun 18 '16 at 07:13
3
On Chrome try to reload with Ctrl + Shift + R
This will not reload with cached files and updates will be shown.

Wai Ha Lee
- 8,598
- 83
- 57
- 92

sc0rp10n.my7h
- 341
- 3
- 15
0
Try this. php artisan cache:clear

hassan.maqsood
- 21
- 6
-
Please edit with more information. Code-only and "try this" answers are discouraged, because they contain no searchable content, and don't explain why someone should "try this". We make an effort here to be a resource for knowledge. – abarisone Jun 17 '16 at 07:20
0
Laravel
To reflect your .js file changes : You can clear the cache in history in the browser.
To reflect your php view file changes : you can delete all autogenerated php files under views folder. path to views folder : Storage -> Frameworks -> Views -> auto generated php files.
When added 'new file' is not detected, you can run 'php composer.phar update' (without quotes) command inside the project directory.

Popeye
- 253
- 4
- 13