Выдаёт эту ошибку в коду, делаю аватарки.
RegisterController
public function reg(Request $request){
$validate = $request->validate([
'name' => 'required',
'email' => 'required|email',
'password' => 'required',
'ava' => 'required'
]);
if($request->has('ava')){
$image = $request->file('ava');
$filename = $image->getClientOriginalName();
$request->$image->move(Storage::path('/public/images/products/').'origin/',$filename);
$validate['ava'] = $request->file('ava')->getClientOriginalName();
}else {
dd('Request Has No File');
}
$user = User::create($validate);
if($user){
Auth::login($user);
}
return redirect()->to(route('user.private'));