我在哪里可以在文件中写入其逻辑?下面是我的登录功能。
public function login( Request $request )
{
$this->validate( $request, [
'email' => 'required|email',
'password' => 'required',
]);
if( Auth::guard('employee')->attempt( [
'email' => $request->input( 'email' ),
'password' => $request->input( 'password' ),
'status'=>'Active'
]) ) {
return redirect('/employee/dashboard');
} else {
return view('employee.login')->withErrors( [ 'email' => 'Authentication failed' ] );
}
}