Image not display why in laravel, what is the issue controller nd blade is added Controller code
try{
$file=$request->file('image');
$filename=$file->getClientOriginalName();
$imgname = uniqid().$filename;
$input['image']= $imgname;
$destinationPath=public_path('upload/image/');
$request->file('image')->move($destinationPath, $imgname);
Auth::user();
$article = new Article();
$article -> user_id=Auth::user()->id;
$article -> title=$request->get('title');
$article -> description=$request->get('description');
$article-> image = $filename;
$article -> status=$request->get('status');
$article->save();
$request->session()->flash('alert-success','article has been sucessfully created.');
return back()->with('success', 'Article created successfully.');
}
catch(ModelNotFoundException $exception){
// do task when error
return back()->withError($exception->getMessage())->withInput(); }
}
in blade file print this code
<td><img src=""
width="500px"></td>
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/Orz6FoG
via IFTTT
Aucun commentaire:
Enregistrer un commentaire