Definitely still there.
https://laravel.com/docs/5.4/requests#files
Now make sure the file system dependencies are updated too. League/filesystem if I remember right.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This was working perfectly under 5.3.
I just upgraded to 5.4 and can no longer upload files using the hasFile() method. The check is ignored
public function addPhotos(Request $request)
{
// dd($request) here shows a file in the fileBag
if ($request->hasFile('photo'))
{
// dd($request) here never prints, this block is passed over as if the file doesn't exist
}
}
Any ideas?
Please or to participate in this conversation.