SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value (SQL: insert into `users` (`photo`, `updated_at`, `created_at`) values (Uploads/kNHiAxuNxvoGE46jt6V4hejdFtYekFMRshQqP1mR.jpeg, 2020-07-01 13:01:45, 2020-07-01 13:01:45))
public function UploadAvatar(Request $r){
$av = $r->file('avatar')->store('Uploads','public');
$user = new Users;
$user->photo = $av;
$user->save();
return view('/my-account',['avatar'=>$user]);
}
$user->name = 'User name';