technobureau/mezzio-pdo-auth

dev-main 2022-01-07 16:50 UTC

This package is auto-updated.

Last update: 2024-09-07 23:16:13 UTC


README

它使用基于 PDO 适配器的 mezzio 认证。对于迁移或使用 doctrine orm 创建表

  • 在 routes.php 中添加以下条目以注册认证路由

    (new TechnoBureau\mezzioPDOAuth\ConfigProvider())->registerRoutes($app, '/user');

  • 在 pipeline.php 中添加以下条目在 RouteMiddleware 之前,以全局注册所有路由的中间件。

    $app->pipe(SessionMiddleware::class); $app->pipe(FlashMessageMiddleware::class);

  • 在 pipeline.php 中添加以下条目在 DispatchMiddleware 之前,以全局注册所有路由器的中间件。

    $app->pipe(UserMiddleware::class);