# dcat-admin **Repository Path**: bmod/dcat-admin ## Basic Information - **Project Name**: dcat-admin - **Description**: 自己使用,基于dcat-admin改动 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-13 - **Last Updated**: 2026-08-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # acms/dcat-admin 基于 [dcat-x/dcat-admin](https://github.com/dcat-x/dcat-admin) `v2.0.2` 的自维护分支,供 ACMS / Laravel 12+ 项目使用。 保留原有 PHP 命名空间 `Dcat\Admin`,仅更换 Composer 包名为 `acms/dcat-admin`,业务代码与扩展无需改命名空间。 ## 兼容性 | 本包版本 | Laravel | PHP | 基线 | | --- | --- | --- | --- | | 1.x | 12.x / 13.x | ≥ 8.3 | dcat-x v2.0.2 | ## 1.0.0 亮点 - 上传 MD5 去重(可配置 `admin.upload.dedup`) - 删除文件时同步清理去重登记表 - `admin_url` / `admin_base_path` 兼容菜单 `uri` 为 null(PHP 8+) - 上传复用时前端提示「文件已存在」 ## 本地 Path 安装(开发期) 在业务项目 `composer.json` 中: ```json { "repositories": [ { "type": "path", "url": "../packages/dcat-admin", "options": { "symlink": true } } ], "require": { "acms/dcat-admin": "*@dev" } } ``` ```bash composer update acms/dcat-admin php artisan admin:publish php artisan admin:install ``` 后台默认地址:`/admin`(见 `config/admin.php`)。 ## 私有 Git / Composer 发布 1. 把本目录推到私有 Git: ```bash git remote add origin https://gitee.com/bmod/dcat-admin.git git push -u origin main git tag v1.0.0 && git push origin v1.0.0 ``` 2. 业务项目改为 VCS 源: ```json { "repositories": [ { "type": "vcs", "url": "https://gitee.com/bmod/dcat-admin.git" } ], "require": { "acms/dcat-admin": "^1.0" } } ``` 3. 多项目稳定后,可再挂 Satis / Packagist Private。 ## 上游同步 ```bash git remote add upstream https://github.com/dcat-x/dcat-admin.git git fetch upstream --tags git cherry-pick # 或 merge 选定 tag 后解决冲突 ``` 同步后只保留本仓 `composer.json` 的包名 / replace / authors 定制。 ## 说明 - `replace` 已声明替代 `dcat/laravel-admin` 与 `dcat-x/laravel-admin`,避免依赖冲突。 - 运行时仍依赖 `dcat-x/easy-excel`(Excel 导出);若 Packagist 镜像缺包,请临时切官方源或一并私有化。 - 原项目与 dcat-x 均为 MIT License,本 fork 同样遵循 MIT。