Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Argument 1 passed to DoctrineInflectorInflector::singularize() must be of the type string, null given,

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.
 
PREVIOUS NEXT
Tagged: #Argument #passed #type #null
ADD COMMENT
Topic
Name
2+6 =