laravel 更改javascript文件和控制器后如何更新laravel项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37873112/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 14:00:12  来源:igfitidea点击:

How to update laravel project after changing javascript file and controller

javascriptphpapachelaravel

提问by Golden_flash

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 ?

我添加了一个 .blade.php 文件并在我的 Laravel 项目中修改了一个控制器和 javascript 文件。我无法在服务器(本地主机)上看到更改。是否有更新/刷新项目的命令?

回答by weigreen

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

禁用浏览器缓存:为网站开发禁用 Chrome 缓存

回答by hassan.maqsood

Try this. php artisan cache:clear

尝试这个。php artisan 缓存:清除

回答by Popeye

Laravel

Laravel

To reflect your .js file changes : You can clear the cache in history in the browser.

反映您的 .js 文件更改:您可以清除浏览器中的历史缓存。

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.

为了反映您的 php 视图文件更改:您可以删除 views 文件夹下的所有自动生成的 php 文件。视图文件夹的路径:存储 -> 框架 -> 视图 -> 自动生成的 php 文件。

When added 'new file' is not detected, you can run 'php composer.phar update' (without quotes) command inside the project directory.

当未检测到添加的“新文件”时,您可以在项目目录中运行“php composer.phar update”(不带引号)命令。

回答by SC0RP10N.MY7H

On Chrome try to reload with Ctrl+ Shift+ R

在 Chrome 上尝试使用Ctrl+ Shift+重新加载R

This will not reload with cashed files and updates will be shown

这不会重新加载兑现的文件,并且将显示更新