【发布时间】:2017-10-09 03:55:36
【问题描述】:
我在上面停留了一段时间,现在有一些明显的东西丢失了,但在i am trying to retrieve the images by the loop 我试图通过循环检索图像的那一刻找不到它
这是保存它的代码,它工作正常。 [保存图片的代码]
这是我尝试将其取出时得到的结果404 error upon retriveing image
【问题讨论】:
-
你能分享
Tour类的代码吗?以及如何将图像保存在数据库中? -
检查你的 images 文件夹是否在 travel/public/admin 文件夹下,如果不是,改变你渲染资源的方式
-
这里是(Tour 类代码)类 Tour extends Authenticatable { use Notifiable; /** * 可批量分配的属性。 * * @var array */ protected $fillable = ['name','location','contact','photo_id','service','description', ]; public function photo(){ return $this->belongsTo('App\Photo'); }
-
@CodeIsLife 我的图片在公共图片文件夹中
标签: php image laravel laravel-5 laravel-5.4