DEV Community

Discussion on: Laravel Form Request Tips & Tricks.

Collapse
 
musman92 profile image
usman

when we have file in request, that request variable did not handle it well and we need to use request() to get that file.

Collapse
 
secmohammed profile image
mohammed osama

I haven't faced this problem, I can retrieve the file uploaded through the validated array, as laravel parses the file we uploaded and instantiate a UploadedFile class instance. Also, as mentioned in the article, validated values are being retrieved from the request bag using a similar algorithm to array intersect, or get from the request by keys we already have at our rules.