-1
Laravel 5.1.35認證在服務器上部署後無法使用。雖然在當地的環境,它的工作很好。Laravel 5.1 Auth不在服務器上工作,而在本地環境中正常工作
由於默認成功登錄重定向到'/ home'並且在/ home路由處理程序中Auth :: check()返回false。
Route::get('/home', function() {
var_dump(Auth::user());
});
上面的代碼打印bool(false);
擊潰代碼:
Route::get('/logout', 'Auth\[email protected]');
Route::get('/login', 'Auth\[email protected]');
Route::get('/home', function() {
var_dump(Auth::user());
});
Route::post('auth/login', 'Auth\[email protected]');
Route::get('/login/{param}', 'Auth\[email protected]');
Route::get('/register', 'Auth\[email protected]');
Route::get('/signup', 'Auth\[email protected]');
Route::post('/auth/stepOne', 'Auth\[email protected]');
Route::post('/auth/stepTwo', 'Auth\[email protected]');
Route::post('/auth/stepTwoBrand', 'Auth\[email protected]');
Route::post('/auth/register', 'Auth\[email protected]');