Laravel 和存储
我制作了一个 Laravel 网站,它在我的电脑上运行良好(不是吗 :P) 我使用 php Artistan storage:link 来链接到我的存储,以便我可以使用 storeAs。现在我有以下问题。我的主机没有控制台,无法为我创建符号链接。我怎样才能访问正确的目录来上传/删除/等我的图像?我现在有这样的情况:
$request->file('blogIMG')->storeAs('public/trips/'. $request->get('tripName') . '/' .$blog->blogName .'/', $request->get('id').'.png');
我真的很想和我的房东待在一起,那么我可以在我的代码中解决这个问题吗?
I have made a Laravel site and it works fine on my pc (don't they all :P)
I used php artistan storage:link
to make a link to my storage so i can use storeAs. Now I have the following problem. My hosting doesnt have a console and can't make the symlink for me. How can I still access the right directory for my image upload/delete/etc stuff? I now have this:
$request->file('blogIMG')->storeAs('public/trips/'. $request->get('tripName') . '/' .$blog->blogName .'/', $request->get('id').'.png');
I would really like to stay with my host, so can I fix this in my code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论