How can I display images from the storage folder (outside public)? I stored my image files in storage/usernamee, but I'm unable to show it in the view. How can I move the upload into "storage/images/" (under a folder name "images")?
View
@method('put')
@csrf
id }}">
Controller
public function updateprofil(Request $request)
{
$request->validate(['cin' => 'size:8']);
if ($request->hasFile('pic')) {
$image = $request->file('pic');
$filename = time() . '.' . $image->getClientOriginalExtension();
Image::make($image)->resize(300, 300)->save(storage_path("app/usernamee/" . $filename));
$request->pic = $filename;
}
$membre = Membre::findOrFail($request->membre_id);
$membre->photo = 'app/usernamee/' . $request->pic;
$membre->update($request->all());
return redirect('profil');
}
This is my view of user profile
PS: The update method works for informations update but doesn't work for the photo.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)