Question and answer is powered by AnsPress.io
try{ $PassChange= AdminLogin::findOrFail(session('admin_id')); $PassChange->password = md5($request->new_password); $PassChange->save(); } catch(ModelNotFoundException $err){ //Show error page }