如何使用NowUI仪表板在laravel 7中捕获originalName? [英] How do I capture originalName in laravel 7 using NowUI dashboard?

查看:19
本文介绍了如何使用NowUI仪表板在laravel 7中捕获originalName?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Laravel 7上传图像.我已经显示了使用 dd()的表单输入,并且正在获取配置文件图像的波纹管输出.我如何捕获originalName并将其保存到数据库?

I am trying to upload an image using Laravel 7. I have displayed the form input using dd() and am getting the bellow output for profile image. How doi I capture the originalName and save to the database?

"profile_image" => Illuminate\Http\UploadedFile {#1251 ▼
-test: false
-originalName: "dvdvdvd.png"
-mimeType: "image/png"
-error: 0
#hashName: null
path: "/tmp"
filename: "phpMTKWo0"
basename: "phpMTKWo0"
pathname: "/tmp/phpMTKWo0"
extension: ""
realPath: "/tmp/phpMTKWo0"
aTime: 2020-09-28 09:58:13
mTime: 2020-09-28 09:58:13
cTime: 2020-09-28 09:58:13
inode: 63413
size: 29795
perms: 0100600
owner: 33
group: 33
type: "file"
writable: true
readable: true
executable: false
file: true
dir: false
link: false

}

推荐答案

使用 getClientOriginalName()引用链接 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆