首先我的系统是Win10的子系统Ubuntu系统。

我在做后台的时候发现上传的图片不显示,发现是没有创建软连接。

我当时有两种方式访问项目,一个是xampp虚拟主机,一个是Ubuntu系统里面运行 php artisan serve。

经过查资料和自己实验,如果你需要用xampp去访问项目,就在windows系统下cmd里面运行 php artisan storage:link。相反如果你是通过127.0.0.1:8000去访问项目的话,就需要在Ubuntu子系统里面运行php artisan storage:link。

如果已经创建过了,或者创建完还是不行,可以把public下面的storage删掉重新试一下。

laravel-admin图片不显示

相关文章:

  • 2021-10-28
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2021-07-03
  • 2022-12-23
  • 2021-05-24
猜你喜欢
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
  • 2021-11-28
  • 2021-12-22
  • 2021-12-10
相关资源
相似解决方案