nonoesp/authenticate

此包已被废弃,不再维护。没有建议的替代包。

Laravel的辅助包,用于常用操作——让您无需思考。

7.0 2020-03-03 15:54 UTC

README

Laravel的简单认证。

安装

composer require nonoesp/authenticate

接下来,将以下中间件添加到您的 app/Http/Kernel.php 文件中。

  • LoginMiddleware · 限制路由为登录用户
  • RememberMiddleware · 记住登录用户
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,
        /// ...
];

可选地,发布并自定义配置文件

php artisan vendor:publish --provider="Nonoesp\Authenticate\AuthenticateServiceProvider" --tag=config

许可证

Authenticate遵循MIT许可证。 (https://open-source.org.cn/licenses/MIT)

关于我

你好。我是Nono Martínez Alonso (Nono.MA),一个喜欢简单性的计算设计师。

我主持Getting Simple——一个关于如何过上有意义、富有创意、简单生活的播客——绘制吸引我注意的事情,并撰写关于享受慢生活的文章。

如果您以任何方式发现此包有用,请在Twitter上联系@nonoesp。干杯!