alefesouza / laravel-vue-boilerplate

:elephant: A Laravel 8 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.
MIT License
540 stars 146 forks source link

Can't login: POST http://localhost:8080/api/login 500 (Internal Server Error) #20

Closed mshahinaz29 closed 3 years ago

mshahinaz29 commented 3 years ago

Screenshot_653 Screenshot_652

kefivitch commented 3 years ago

If adding your routes inside the web middleware doesn't work for any reason then try adding this to $middleware into Kernel.php

protected $middleware = [
        //...
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
];
mshahinaz29 commented 3 years ago

If adding your routes inside the web middleware doesn't work for any reason then try adding this to $middleware into Kernel.php

protected $middleware = [
        //...
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
];

Thanks! It worked.