cobraprojects/laravel-multiauth
Composer 安装命令:
composer require cobraprojects/laravel-multiauth
包简介
Laravel Multiauth package
关键字:
README 文档
README
this help to fast start my admin panel with multiauth guards and easy to customize package.
- Enable multi Auth system for any guards you need (default: user & admin).
- publish views for the admin panel so you can overrride it.
- Adds another views-admin directory avialble to seperate your admin views from your site views
- Configrable setting to mange it as you want (prefix - redirect url - guard name - table name)
- Built in roles and permissions
Installation
Install the package to laravel via composer.
$ composer require cobraprojects/laravel-multiauth
Puplish config, migration, migrate the database, assets, views, install all dependencies via npm, run laravel mix and seed admin user.
all above with the next artisan command:
$ php artisan multiauth:install
Defult Settings
By default it will install every thing you need to start your multiauth and the admin panel.
You can login to your admin panel by http://yourdomain.com/admin
the default username is super@admin.com.
the default password is password.
you can change these values from the config/multiauth.php file
Config file
| Key | default value | action |
|---|---|---|
| admin_active | true | enable / disable the admin panel |
| admin.validations | empty | array for validate admin register form |
| prefix | admin | the prefix for your routes to access the admin panel (http://domain.com/`prefix`) this will also change the login email address super@ prefix.com |
| registration_notification_email | false | enable/disable notify new registerd admin via email |
| redirect_after_login | admin.home | the route name of your admin home page to redirect logged admis to it |
| models.admin | CobraProjects\Multiauth\Model\Admin::class | the admin class if you need to use your own |
| models.role | CobraProjects\Multiauth\Model\Role::class | the role class if you need to use your own |
| models.permission | CobraProjects\Multiauth\Model\permission::class | the permission class if you need to use your own |
Create new role
you can use the admin panel or artisan command.
1- Using artisan command
$ php artisan multiauth:role rolename
2- Using Interface Just go to https://domain.com/admin/roles
you can add, edit or delete roles from this page
Note: only admin with the role super can view this page.
Create new permission
- Create a new crud permissions for any model:
$ php artisan multiauth:permissions {model}
Here {model} means for which model you want to create crud permissions for. For example,
if you run php artisan multiauth:permissions blog then it will create following permissions:
- CreateBlog
- ReadBlog
- UpdateBlog
- DeleteBlog
- You can create single permission for any model
$ php artisan multiauth:permission --name={permissionName} {model}
or example, if you run php artisan multiauth:permissions blog --name=Publish It will create a permission in your database called PublishBlog.
Todos
- permissions views to add from admin panel
- command to link role with permissions
License
MIT
cobraprojects/laravel-multiauth 适用场景与选型建议
cobraprojects/laravel-multiauth 是一款 基于 CSS 开发的 Composer 扩展包,目前已累计 234 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 07 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「multiauth」 「Multi Auth」 「Laravel multiauth」 「laravel acl」 「laravel permissions」 「admin auth」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cobraprojects/laravel-multiauth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cobraprojects/laravel-multiauth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cobraprojects/laravel-multiauth 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Multiauth package
Theme and asset management for laravel
This package provides Laravel bindings and a Eloquent/Model trait for pragmarx/recovery package.
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
This package provides a flexible way to add Role-based Permissions to Laravel 6.x
Multiauth and custom grants for laravel passport
统计信息
- 总下载量: 234
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-27