lundi 27 juillet 2020

i want to upload image into my database but i keep getting this ```C:\xampp\tmp\php4FB4.tmp``` in my database?

i only get filename in public/doc folder, i want to get filename in my database.

my html

                            
<input type="file" id="image" name="image">```


my model

```protected $fillable = [
        'created_by', 'employee_id', 'name', 'father_name', 'mother_name', 'spouse_name', 'email', 'password', 'present_address', 'permanent_address', 'home_district', 'id_name', 'id_number', 'contact_no_one', 'contact_no_two', 'emergency_contact', 'web', 'gender', 'date_of_birth', 'marital_status', 'avatar', 'client_type_id', 'designation_id', 'access_label', 'joining_position', 'activation_status', 'academic_qualification', 'professional_qualification', 'experience', 'reference',  'joining_date', 'deletion_status', 'role', 'image',
    ];```

my route
```Route::post('/people/employees/store', 'EmplController@store');```


my controller
```$filename = $request->image->getClientOriginalName();

         $request->image->move(public_path('doc'), $file_name);```


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2DcR3R4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire