📌  相关文章
📜  传递给 Doctrine\Inflector\Inflector::singularize() 的参数 1 必须是 string 类型,给定 null, - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:07.090000             🧑  作者: Mango

代码示例1
In lfmhelpers.php line 335 replace the return with this:

return lcfirst(str_singular(request('type') ? request('type') : '')) === 'image';

and in vendor/unisharp/laravel-filemanager/src/views/index.blade.php line 209 
replace with this:

acceptedFiles: "{{ lcfirst(str_singular(request('type') ? request('type') : '')) == 'image' ? implode(',', config('lfm.valid_image_mimetypes')) : implode(',', config('lfm.valid_file_mimetypes')) }}",
maxFilesize: ({{ lcfirst(str_singular(request('type') ? request('type') : '')) == 'image' ? config('lfm.max_image_size') : config('lfm.max_file_size') }} / 1000)

Hope this helps, it works in mine.