Image source not readable
i have a issue to upload a image dear community please help me out
public function update(User $user)
{
$data= tap(request()->validate([
'f_name'=>'required',
'l_name'=>'required',
'email'=>'email|required',
'phone'=>'required|numeric',
'birthdate'=>'required|date',
'adress'=>'required',
]),function(){
if(request()->hasFile('image')){
request()->validate([
'image'=>'file|image|max:5000',]);
}
});
$user->update($data);
$this->StoreImage($user);
request()->session()->flash('msg','customer has been Updated successfully');
return redirect('/user/unActive');
}
private function StoreImage($user){
if(request()->has('image')){
$user->update([
'image'=>request()->image->store('uploads','public'),
]);
$image= Image::make(public_path('storage/'.$user->image))->fit(300,300);
$image->save();
}
}
}
private function StoreImage($user){
if(request()->has('image')){
$user->update([
'image'=>request()->image->store('uploads','public'),
]);
$image= Image::make(public_path('storage/'.$user->image))->fit(300,300);
$image->save();
}
Intervention \ Image \ Exception \ NotReadableException Image source not readable
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2mvemOo
via IFTTT
Aucun commentaire:
Enregistrer un commentaire