简体   繁体   English

Laravel CPanel - 公共文件夹的新图像未显示

[英]Laravel CPanel - New Image to public folder not showing

I have uploaded my Laravel app to CPanel and it works completely fine.我已将我的 Laravel 应用程序上传到 CPanel,它运行良好。 Then, I was making some changes to the Views by adding some new blade files.然后,我通过添加一些新的刀片文件对视图进行了一些更改。 I also add new images to the public folder, where I put my previous images and it was working completely fine.我还将新图像添加到公共文件夹中,我将以前的图像放在那里,并且运行正常。 But when I load the new page, the images are not showing, only the older image that I have uploaded before.但是当我加载新页面时,图像没有显示,只有我之前上传的旧图像。

The HTML tag is the same as the already existing image but why it is not showing? HTML 标签与已经存在的图像相同,但为什么不显示? This is the HTML tag that I use in the blade:这是我在刀片中使用的 HTML 标记:

<img src="{{ url('images/logo-cimahi.svg') }}"/>

I put the images in the public/images/ for the already existing images but the new images in the same path not showing.对于已经存在的图像,我将图像放在 public/images/ 中,但未显示同一路径中的新图像。

Does my image broken or do I have to do something with PHP artisan command?我的图像是否损坏了或者我必须使用 PHP artisan 命令做些什么?

Try to clear all Laravel's cache, just run the following command:尝试清除所有 Laravel 的缓存,只需运行以下命令:

$ php artisan optimize:clear

This will be an ouput:这将是一个输出:

Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
Caches cleared successfully!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM