Reputation: 85
I have an issue with my current web project. I need to check if my request contains an input called image, so I just apply the normal method like so:
if($request->has('image'))
{
...
}
But for some reason, this is not working as shown below:
Can someone explain me why ?
Upvotes: 0
Views: 28
Reputation: 21901
I think you need to access uploaded files as,
$request->hasFile('image');
then it should be
if($request->hasFile('image')) { ...
see this DOC
Upvotes: 2