【发布时间】:2020-06-21 16:29:52
【问题描述】:
我有这个
$file = array('file' => Input::file('file'));
和
dd($file);返回
如何通过 Laravel 方式访问文件 mimeType ?
【问题讨论】:
-
试试
$file->getClientMimeType()或$file->getMimeType()ref -
Call to a member function getMimeType() on array -
有人对我的帖子投了反对票,请解释原因!,这样我才能学会不再这样做。
-
将
$file = array('file' => Input::file('file'));更新为$file = Input::file('file');