Download the PHP package mycm/easyadmin-sdk without Composer

On this page you can find all versions of the php package mycm/easyadmin-sdk. 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 easyadmin-sdk

EasyAdmin SDK

基于 PHP 注解的权限节点管理与文件上传工具包,适用于 ThinkPHP 8 及以上版本。

安装

模块概览

模块 命名空间 说明
注解 EasyAdmin\annotation 控制器与方法的权限注解类
权限 EasyAdmin\auth 控制器扫描与权限节点生成
控制台 EasyAdmin\console 命令行彩色输出工具
工具 EasyAdmin\tool 通用工具方法集合
上传 EasyAdmin\upload 多驱动文件上传(本地 / 阿里云 / 七牛 / 腾讯云)

1. 注解模块 (EasyAdmin\annotation)

ControllerAnnotation

控制器注解,用于标记控制器类,定义控制器标题和权限控制。

属性 类型 说明
title string 控制器标题(必填)
auth bool 是否开启权限控制,默认 true

NodeAnnotation

节点注解,用于标记控制器方法,定义节点名称和权限控制。

属性 类型 说明
title string 节点名称(必填)
auth bool 是否开启权限控制,默认 true

2. 权限节点模块 (EasyAdmin\auth)

Node

扫描控制器目录,解析控制器和方法的注解,生成完整权限节点列表。

返回格式:

方法 说明
setDir(string $dir) 设置控制器目录
setNamespacePrefix(string $prefix) 设置命名空间前缀
setAnnotationCacheDir(string $dir) 设置注解缓存目录
setAnnotationDebug(bool $debug) 设置 debug 模式
getNodelist() 获取所有权限节点
getControllerList() 获取所有控制器列表

3. 控制台模块 (EasyAdmin\console)

CliEcho

命令行彩色输出工具,支持多种前景色和背景色。

前景色:black / dark_gray / blue / light_blue / green / light_green / cyan / light_cyan / red / light_red / purple / light_purple / brown / yellow / light_gray / white

背景色:black / red / green / yellow / blue / magenta / cyan / light_gray


4. 工具模块 (EasyAdmin\tool)

CommonTool

通用工具方法集合。


5. 上传模块 (EasyAdmin\upload)

支持 本地 / 阿里云 OSS / 七牛云 / 腾讯云 COS 四种上传方式,内置图片缩略图和水印功能。

基本用法

配置项

可通过 setUploadConfig() 传入以下配置数组:

上传驱动

驱动 命名空间 说明
Local EasyAdmin\upload\driver\Local 本地上传
Alioss EasyAdmin\upload\driver\Alioss 阿里云 OSS
Qnoss EasyAdmin\upload\driver\Qnoss 七牛云
Txcos EasyAdmin\upload\driver\Txcos 腾讯云 COS

扩展自定义驱动

实现 EasyAdmin\upload\interfaces\OssDriver 接口即可扩展新的云存储驱动:

文件上传保存触发

上传成功后会通过 EasyAdmin\upload\trigger\SaveDb 自动将文件信息保存到数据库,默认表名为 system_uploadfile,可通过 setTableName() 自定义。

类关系


测试

License

MIT License.


All versions of easyadmin-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
mycm/annotations Version ^1.0
ext-json Version *
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 mycm/easyadmin-sdk contains the following files

Loading the files please wait ...