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);```
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire