Download the PHP package mdt-star/nexus without Composer

On this page you can find all versions of the php package mdt-star/nexus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nexus

Nexus — Laravel 核心权限枢纽

Laravel 核心权限模块,提供功能权限控制、菜单管理、数据范围策略、动态配置等基础设施能力。

功能特性

安装

配置

发布配置文件:

发布语言文件:

快速开始

1. 权限同步

同步单个模块的权限和菜单:

2. 路由权限控制

使用 Route::auth() 路由组自动注入权限校验:

中间件参数格式:auth.tag:{tag},{guard?}

3. 路由挂载系统(Mount System)

路由挂载系统提供了一种声明式、可继承的路由组织方式。通过预定义"挂载点",快速注册带有统一前缀和中间件能力的路由组。

基础使用:

快捷宏(自动注册):

扩展自定义 Mount:

4. 数据范围 Trait

在模型中使用数据范围控制:

5. 模型权限控制

在模型中使用模型访问权限:

6. 功能权限接口

模型实现 HasPermission 接口即可获得 tag 权限校验能力:

User 模型已内置实现,支持穿透 Role 合并 tag:

第三方模块集成

第三方模块在 composer.json 中声明权限和菜单:

核心概念

概念 说明
Permission 功能权限节点,通过 tag 标识
Package 模块包,关联一组权限
Permissionable 多态关联,将 tag 授予 User/Role(原 ModelHasPermission)
Role 角色组,支持 tag 穿透到用户
Menu 菜单发布池,前端可用的菜单项
Desktop 用户桌面,支持自定义布局
DataScope 数据范围策略,控制查询数据边界
DynamicConfig 动态配置,支持运行时修改
ModelAccess 模型级别的读写删权限控制

架构设计

权限校验流程

数据范围流程

设计原则

  1. 零物理外键 - 逻辑关联,表结构独立
  2. Laravel 生态兼容 - 遵循命名规范,使用生态工具
  3. 配置驱动 - 静态配置放 config,动态配置放数据库
  4. 模块化 - 第三方模块即装即用
  5. 单一职责 - 每个类只做一件事

测试

当前测试覆盖:117 个测试,232 个断言,涵盖 HasPermissionTrait、PermissionSyncer、Package、PermissionDeniedException、User 穿透 Role 集成测试、Mount 路由挂载系统、Desktop/DesktopItem API 集成测试。

许可证

MIT


All versions of nexus with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/auth Version ^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mdt-star/nexus contains the following files

Loading the files please wait ...