techaxion/user-roleright-laravel
Composer 安装命令:
composer require techaxion/user-roleright-laravel
包简介
User Role and Right Management With Route
README 文档
README
User Role and Right Management With Route
Features
- Manage users, roles, and permissions
- Assign roles and permissions to users
- Middleware for route protection
- Easy integration with Laravel projects
Installation
Add the following code to the composer.json file located in the root folder of your project.
"repositories": [ { "type": "vcs", "url": "https://gitlab.techaxion.com/composer-plugins/laravel/role-right-management.git" } ]
composer require techaxion/user-roleright-laravel
* Checks if the 'module_action' table exists to prevent reinstallation.
* Publishes package routes using the 'vendor:publish' Artisan command.
* Runs package-specific migrations for required tables.
* Seeds the 'module_action' table with initial data.
* Publishes package configuration and other assets.
* Appends a require statement for dynamic routes to 'routes/web.php'.
* Adds a 'remove-useraccess' script to 'composer.json' for easy package removal.
Initialization
php artisan useraccess:init-config
* Initializes the package by creating necessary directories and files.
* Creates a `config/useraccess.php` file for dynamic layout file changes and other configurations.
* Outputs an informational message indicating successful initialization.
uninstall
composer run remove-useraccess
* Checks for the existence of the `routes/UserAccessDynamicRoutes.php` file:
* - If it exists, removes the dynamic route inclusion from `routes/web.php` and deletes the dynamic routes file.
* - If unable to open `routes/web.php` for writing, outputs an error message.
* Opens and decodes the `composer.json` file, removes the `remove-useraccess` script entry, and writes the updated JSON back to the file.
* Outputs an informational message indicating the completion of the package removal process.
* Checks for the existence of the `config/useraccess.php` file.
* - If it exists, removes `useraccess.php` from `config` folder.
Usage within Plugin
Layout File: @extends('laravelMain::' . $layout_file)
Push content to above layout file using: @section(config('useraccess.yield_container'))
Users table from Database: user_table: users(default table)
Migration URL, where you can get all routes that are assigned to you : https:test.com/useraccess/menu/migrate
Menu management setting page URL: https:test.com/useraccess/setting You can change the configurations like Users table, layout path, Yield Container: You can also get code to display all dynamic routes
License
MIT
techaxion/user-roleright-laravel 适用场景与选型建议
techaxion/user-roleright-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 44 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 techaxion/user-roleright-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 techaxion/user-roleright-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-15