Answers for "Argument 1 passed to Doctrine\Inflector\Inflector::singularize() must be of the type string, null given,"

0

Argument 1 passed to Doctrine\Inflector\Inflector::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.
Posted by: Guest on April-22-2021

Code answers related to "Argument 1 passed to Doctrine\Inflector\Inflector::singularize() must be of the type string, null given,"

Browse Popular Code Answers by Language