User::create([
'name'=>$request->input('name'),
'email'=>$request->input('email'),
'password'=>bcrypt($request->input('password')),
])->roles()->attach($request->input('role_id'));
return $this->loginnormalstore($request);
public function loginnormalstore(Request $request)
{
// $this->validateLogin($request);
// Validate the form data
$this->validate($request, [
'email' => 'required',
'password' => 'required|min:6'
]);
if (Auth::guard('web')->attempt(['email' => $request->email, 'password' => $request->password], $request->remember))
{
return redirect('/');
}
return redirect()->back()->withInput($request->only('email', 'remember'));
}
Reference: hmc ko normalusercontroller ko ....
Comments
Post a Comment