定制 shawnsandy/dash-auth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shawnsandy/dash-auth

Composer 安装命令:

composer require shawnsandy/dash-auth

包简介

Dash auth

README 文档

README

Dash Auth is simple way to create & manage Bouncer Roles & Abilities.

Install

Via Composer

"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/shawnsandy/dash-auth"
        }
    ],
  • Add the package to your composer.json file as VCS repository, sorry there is no packagist install just yet.
$ composer require shawnsandy/dash-auth
  • From the command prompt run the above to install the package

Usage

Quick Start Laravel 5.5x and greater

SUPER_ADMIN_EMAIL=my_super_admin_here@mysite.me
  • Add the SUPER_ADMIN_EMAIL to your .env file with the email of the registered user that will act as your super-admin.
php artisan vendor:publish --tag=dashauth-config
  • From the console use the --tag option to publish config file
   'roles' => [
        'superadmin' => "Super Admin",
        'admin' => "Admin",
        'staff' => "Staff",
        'editor' => "Editor",
        'member' => "Member",
    ],

    'abilities' => [
        'assign_roles' => 'Assign Roles',
        'manage_users' => 'Manage Users',
        'manage_posts' => 'Manage Posts',
        'manage_admin' => 'Manage Site',
        'manage_systems' => 'Manage Systems',
    ],
  • Edit the config settings (optional), go to config/dashauth.php
Dashauth::routes();
  • Add the default dash routes, open routes\web.php file and add the above

Alt text

Setup SuperAdmin Role

  • Set the superadmin email in you .env file SUPERADMIN_EMAIL=youremail@you.com
  • Next go to yoursite.com/dashauth and create a super admin
  • Manage \ View privileges yoursite.com/dashauth/privileges

Manage Roles Component

Add the manage roles component to application passing the user info $user = User::find(1)

<p class="subtitle is-3">Manage Roles</p>

@component("dashauth::forms.privileges", [ "user" => $user ) ])
@slot('btn_class')  button is-link is-large is-uppercase  @endslot
@endcomponent
  • Dash auth comes with a simple component to manage roles you can add the component forms.roles component to you user record.

Alt text

Manage Abilities (privileges)

 @component('dashauth::components.privileges')
  • Assign and remove abilities to/from using the dashauth::components.privileges component.

Larvel 5.4x

Add the service provider to the config/app.php file

"providers" => [
    ShawnSandy\DashAuth\DashAuthServicesProvider::class,
]

Add the facade to config/app.php file

aliases => [
"Dashauth" => ShawnSandy\DashAuth\DashAuthFacade::class,
]

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email shawnsandy04@gmail.com instead of using the issue tracker.

Credits

  • [Shawn Sandy][link-author]
  • [All Contributors][link-contributors]

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固