foostart/package-acl

Laravel认证和ACL包,拥有酷炫的Admin面板。支持Laravel 7x


README

要求

  • 使用.env文件配置数据库

要求

  • 使用composer安装:composer require foostart/package-acl

步骤1:将包注册到Laravel

现在打开文件 config/app.php 并将以下行添加到 providers 选项中

  1. Foostart\Acl\Authentication\AuthenticationServiceProvider::class,
  2. Foostart\Category\CategoryServiceProvider::class,

步骤2:将中间件注册到Laravel

现在打开文件 app/Http/Kernel.php 并将以下行添加到您的 routeMiddleware 数组中

  1. 'admin_logged' => \Foostart\Acl\Http\Middleware\AdminLogged::class,
  2. 'logged' => \Foostart\Acl\Http\Middleware\Logged::class,
  3. 'can_see' => \Foostart\Acl\Http\Middleware\CanSee::class,
  4. 'has_perm' => \Foostart\Acl\Http\Middleware\HasPerm::class,
  5. 'in_context' => \Foostart\Category\Middleware\InContext::class,

步骤3:在数据库/migrations中删除用户和密码迁移文件

步骤4:安装

  1. php artisan authentication:install
Which provider or tag's files would you like to publish?:
Select option [* ] Provider: Foostart\Acl\Authentication\AuthenticationServiceProvider
  1. php artisan vendor:publish --provider="Foostart\Category\CategoryServiceProvider" --force
  2. 参考:https://packagist.org.cn/packages/foostart/package-post