Simple authentication for Laravel.
composer require nonoesp/authenticate
Next, add the following middlewares to your app/Http/Kernel.php
file.
LoginMiddleware
· restricts routes to logged usersRememberMiddleware
· remembers logged users
protected $middleware = [
/// nonoesp/authenticate
// TODO - verify we need these first two here
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Nonoesp\Authenticate\Middleware\RememberLogin::class,
/// ...
];
protected $routeMiddleware = [
/// nonoesp/authenticate
'login' => \Nonoesp\Authenticate\Middleware\RequireLogin::class,
/// ...
];
Optionally, publish and customize configuration file.
php artisan vendor:publish --provider="Nonoesp\Authenticate\AuthenticateServiceProvider" --tag=config
Authenticate is licensed under the MIT license. (http://opensource.org/licenses/MIT)
Hi. I'm Nono Martínez Alonso (Nono.MA), a computational designer with a penchant for simplicity.
I host Getting Simple—a podcast about how you can live a meaningful, creative, simple life—sketch things that call my attention, and write about enjoying a slower life.
If you find this pacakge useful in any way, reach out on Twitter at @nonoesp. Cheers!