Session laravel 4.2会话导致internet explorer 11出现问题
我在IE 11中遇到了一些奇怪的问题。但其在FF和铬合金中工作良好 让我试着深入解释一下 我有这样的URLSession laravel 4.2会话导致internet explorer 11出现问题,session,laravel-4,internet-explorer-11,Session,Laravel 4,Internet Explorer 11,我在IE 11中遇到了一些奇怪的问题。但其在FF和铬合金中工作良好 让我试着深入解释一下 我有这样的URL https://www.printhubpro.co.uk/ryman 这个URL的路由是 Route::get('{slug}', 'DesignerController@getClient'); 在控制器功能中 public static function getClient($slug) { // Check if the client exists $clien
https://www.printhubpro.co.uk/ryman
这个URL的路由是
Route::get('{slug}', 'DesignerController@getClient');
在控制器功能中
public static function getClient($slug)
{
// Check if the client exists
$client = User::where('slug', $slug)->first();
if (! $client) {
return View::make('error.404');
}
Session::put('client', $client->toArray());
return Redirect::to('/');
}
它设置会话并将用户重定向到主站点
现在我这里有一个设计师,它使用fabricJs
https://www.printhubpro.co.uk/designer/new/2002
现在在这个设计器上,如果我按订购这个模板
,它会显示登录弹出窗口。
登记就行了
它在FF和chrome中工作,但在IE11中不工作。我检查了一下,登录后会话似乎无法正常工作。它删除所有会话
这是Ajax登录路径
Route::post('ajax/login', 'AjaxController@postLogin');
和控制器功能
public function postLogin()
{
$input = Input::all();
// Validate input
$validator = Validator::make($input, array(
'username' => 'required',
'password' => 'required'
));
// Validation failed
if ($validator->fails()) {
$messages = $validator->messages();
return array('error' => $messages->first());
}
$credentials = array(
'username' => $input['username'],
'password' => $input['password'],
'store_id' => Session::get('client.id')
);
// Get their credentials
// Failed to auth
if (! Auth::attempt($credentials)) {
return array('error' => Lang::get('messages.login.fail'));
}
// Store their canvas
if (isset($input['canvas'])) {
Session::put('canvas.flash', $input['canvas']);
}
// If they're a client set the client
if (Auth::user()->role == Config::get('constants.roles.client')) {
Session::put('client', Auth::user()->toArray());
}
// Successfully logged in
return 1;
}
登录后,我将再次重定向到主站点。但问题是登录后并没有会话,所以当重定向时,我会因为并没有会话而出错