Mubashar's avatar

Hi I try to upload image in user profile

When i use $request->image it return image name with extention but when i user $request->file('image') it return null. I don't understand why? and in my form files='true'

0 likes
4 replies
Equilibum's avatar

Add this attribute to your form (if no exists): enctype="multipart/form-data"

Mubashar's avatar

i am using html for form and here is my form

id }}{{ old('id') }}"> name}}@endif{{old('name')}}" placeholder="Enter Your Name" required pattern="^[a-zA-Z][a-zA-Z0-9-_\.]{4,20}$" title="5 to 20 characters"> {{--{!! Form::file('image') !!}--}}
Mubashar's avatar

i got it . i am using html and it works with enctype="multipart/form-data" . files='true' used with blade.

Please or to participate in this conversation.