这是我用于登录检查的代码。如何在特定时间内保持cookie值以保持登录状态。
/*--------------- Check Login -----------------*/
public function checkLogin(Request $request){
$email=$request->email;
$password=md5($request->password);
$remember_me = $request->has('remember_me') ? true : false;
$result=DB::table('admins')->where('email_address',$email)->where('password',$password)->where('access_label',3)->where('activation_status',1)->first();
if($result){
Session::put('frontend_name', $result->admin_name);
Session::put('frontend_id', $result->admin_id);
Session::put('frontend_label',$result->access_label);
return Redirect::to('/');
}else {
Session::put('exception', 'Invalid Login Detail...!!!');
return Redirect::to('frontend-login');
}
}