did you try this?
$filename= request()->file('avatar')->store('public/avatars/2');
How to image upload in the folder. I was image capture using the webcam that capture image how to store in the folder. following are the controller code. please give me solution
if (Input::get('mydata'))
{
$location = "uploads/profile/";
$binary_data = Input::get('mydata');
$fileInstance = base64_decode($binary_data);
$newFileName = "profile_".$User->id.".jpg";
//$file = $fileInstance->move('uploads/profile/',$newFileName);
$file = $fileInstance->move_uploaded_file($newFileName,$location);
$User->photo = "profile_".$User->id.".jpg";
$User->save();
}
i was search in the previous forum but nothing found anything about that
Please or to participate in this conversation.