J
J
Justique2016-01-16 22:57:28
User identification
Justique, 2016-01-16 22:57:28

Laravel 5 why is authorization not working?

Today I installed laravel 5 on ubuntu server via composer
I do authorization according to the manual Error
when switching to /auth/login
7b2f9804e0154d0aa83f113f294c9ac4.png
Has anyone encountered such a problem?
This is my first time dealing with Laravel, but I have experience with frameworks.
debug log

ErrorException in compiled.php line 2966:
Session store not set on request. (View: /var/www/html/laravel/resources/views/auth/login.blade.php)
in compiled.php line 2966
at CompilerEngine->handleViewException(object(RuntimeException), '1') in compiled.php line 14704
at PhpEngine->evaluatePath('/var/www/html/laravel/storage/framework/views/41abd1104360d7016c1bcc4583eff30a32eb0a62.php', array('__env' => object(Factory), 'app' => object(Application))) in compiled.php line 14739
at CompilerEngine->get('/var/www/html/laravel/resources/views/auth/login.blade.php', array('__env' => object(Factory), 'app' => object(Application))) in compiled.php line 14571
at View->getContents() in compiled.php line 14559
at View->renderContents() in compiled.php line 14550
at View->render() in compiled.php line 15716
at Response->setContent(object(View)) in compiled.php line 15215
at Response->__construct(object(View)) in compiled.php line 8042
at Router->prepareResponse(object(Request), object(View)) in compiled.php line 9101
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24
at RedirectIfAuthenticated->handle(object(Request), object(Closure))
at call_user_func_array(array(object(RedirectIfAuthenticated), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9588
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 9102
at ControllerDispatcher->callWithinStack(object(AuthController), object(Route), object(Request), 'getLogin') in compiled.php line 9089
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Auth\AuthController', 'getLogin') in compiled.php line 8193
at Route->runController(object(Request)) in compiled.php line 8180
at Route->run(object(Request)) in compiled.php line 7908
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 7909
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7900
at Router->dispatchToRoute(object(Request)) in compiled.php line 7890
at Router->dispatch(object(Request)) in compiled.php line 2356
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3139
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9588
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 2303
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2287
at Kernel->handle(object(Request)) in index.php line 54
1/2
RuntimeException in compiled.php line 2966:
Session store not set on request.
in compiled.php line 2966
at Request->session() in compiled.php line 2813
at Request->old('email', null) in helpers.php line 458
at old('email') in 41abd1104360d7016c1bcc4583eff30a32eb0a62.php line 7
at include('/var/www/html/laravel/storage/framework/views/41abd1104360d7016c1bcc4583eff30a32eb0a62.php') in compiled.php line 14702
at PhpEngine->evaluatePath('/var/www/html/laravel/storage/framework/views/41abd1104360d7016c1bcc4583eff30a32eb0a62.php', array('__env' => object(Factory), 'app' => object(Application))) in compiled.php line 14739
at CompilerEngine->get('/var/www/html/laravel/resources/views/auth/login.blade.php', array('__env' => object(Factory), 'app' => object(Application))) in compiled.php line 14571
at View->getContents() in compiled.php line 14559
at View->renderContents() in compiled.php line 14550
at View->render() in compiled.php line 15716
at Response->setContent(object(View)) in compiled.php line 15215
at Response->__construct(object(View)) in compiled.php line 8042
at Router->prepareResponse(object(Request), object(View)) in compiled.php line 9101
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24
at RedirectIfAuthenticated->handle(object(Request), object(Closure))
at call_user_func_array(array(object(RedirectIfAuthenticated), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9588
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 9102
at ControllerDispatcher->callWithinStack(object(AuthController), object(Route), object(Request), 'getLogin') in compiled.php line 9089
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\Auth\AuthController', 'getLogin') in compiled.php line 8193
at Route->runController(object(Request)) in compiled.php line 8180
at Route->run(object(Request)) in compiled.php line 7908
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 7909
at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7900
at Router->dispatchToRoute(object(Request)) in compiled.php line 7890
at Router->dispatch(object(Request)) in compiled.php line 2356
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3139
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9588
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9578
at Pipeline->then(object(Closure)) in compiled.php line 2303
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2287
at Kernel->handle(object(Request)) in index.php line 54

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrzej Wielski, 2016-01-17
@Justique

As far as I understand, you are using Laravel 5.2
In the latest version, you need to connect middleware web to the routes for sessions to work, CSRF check (which it swears at), and so on.

Route::group(['middleware' => ['web']], function () {
    // тут храните все ваши роуты, которым нужны формы (GET, POST)
});

command. Laravel will create all routes, views, and connect everything correctly.

I
IceJOKER, 2016-01-16
@IceJOKER

Enable debug mode

R
Rikcon, 2016-01-16
@Rikcon

Do you have rights to the storage folder?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question