PHPackages                             ptadmin/admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ptadmin/admin

ActiveLibrary[Framework](/categories/framework)

ptadmin/admin
=============

PTAdmin admin package for Laravel.

1.1.47(4w ago)01851Apache-2.0PHPPHP ^7.4 || ^8.0CI failing

Since May 9Pushed 1w agoCompare

[ Source](https://github.com/pangtou-com/ptadmin-admin)[ Packagist](https://packagist.org/packages/ptadmin/admin)[ RSS](/packages/ptadmin-admin/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (54)Versions (55)Used By (1)

PTAdmin Admin
=============

[](#ptadmin-admin)

`ptadmin/admin` 是 PTAdmin 后台管理内核包。

它负责提供后台认证、授权资源、角色授权、组织扩展能力、后台接口路由、中间件、初始化命令，以及对应的配置、迁移和语言包。`ptadmin/addon` 与 `ptadmin/easy` 已作为强依赖内置在包依赖中，安装 `ptadmin/admin` 后不需要再单独安装这两个包。

功能范围
----

[](#功能范围)

- 后台登录与认证守卫
- 资源授权、角色授权、直接授权
- 租户、组织、部门扩展表结构
- 后台 API 路由与中间件注册
- 后台前端入口路由与运行时配置脚本
- 默认后台资源初始化
- 配置、迁移、语言包、前端静态资源发布

安装
--

[](#安装)

```
composer require ptadmin/admin
```

发布与迁移
-----

[](#发布与迁移)

发布全部 PTAdmin 资源：

```
php artisan vendor:publish --tag=ptadmin --force
```

发布配置：

```
php artisan vendor:publish --tag=ptadmin-config --force
```

发布迁移：

```
php artisan vendor:publish --tag=ptadmin-migrations --force
```

发布后台前端静态资源：

```
php artisan vendor:publish --tag=ptadmin-assets --force
```

执行迁移：

```
php artisan migrate
```

前端入口
----

[](#前端入口)

后台前端页面入口与接口入口已拆分：

- `PTADMIN_WEB_PREFIX`：后台页面入口，默认 `admin`
- `PTADMIN_API_PREFIX`：后台接口入口，默认 `system`

运行时配置脚本固定为：

```
/{PTADMIN_WEB_PREFIX}/ptconfig.js

```

初始化命令
-----

[](#初始化命令)

初始化创始人账户与默认授权：

```
php artisan admin:auth
```

更新包内置后台前端构建资源：

```
php artisan admin:fe:pull
```

更新包内置后台前端构建资源并发布到运行目录：

```
php artisan admin:fe:update
```

拉取项目二开前端模板源码：

```
php artisan admin:pf:pull
```

发布项目二开前端构建产物：

```
php artisan admin:pf:publish
```

应用实例身份
------

[](#应用实例身份)

PTAdmin 安装完成时会生成稳定的应用实例 ID 和 RSA 密钥对，供插件市场授权绑定与周期签名验证使用。默认保存在：

```
storage/app/ptadmin/application-instance.json

```

可通过 `PTADMIN_APPLICATION_INSTANCE_PATH` 调整路径。身份文件属于宿主私有运行数据，不应放入公开目录、插件包或代码仓库。已有项目升级后会在首次使用应用实例授权时初始化；文件一旦损坏，系统会明确报错，不会静默生成新实例并造成已有授权漂移。

测试
--

[](#测试)

包内测试基于 `orchestra/testbench`，独立仓库中可直接执行：

```
composer install
composer test
```

目录结构
----

[](#目录结构)

```
ptadmin/
├── composer.json
├── README.md
├── phpunit.xml.dist
├── config/
├── database/
├── lang/
├── routes/
├── src/
└── tests/

```

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance97

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~2 days

Total

54

Last Release

28d ago

Major Versions

v0.0.9 → 1.1.02026-05-09

PHP version history (2 changes)v0.0.1PHP ^7.3|^8.0

1.1.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/06e7fe1f698f7d2e0dc1fc119608759de78a83c5eb613c1c7c7146453ddc39bc?d=identicon)[873934580](/maintainers/873934580)

---

Top Contributors

[![zane-xin](https://avatars.githubusercontent.com/u/16483916?v=4)](https://github.com/zane-xin "zane-xin (143 commits)")[![huwenjie12345](https://avatars.githubusercontent.com/u/110954912?v=4)](https://github.com/huwenjie12345 "huwenjie12345 (11 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ptadmin-admin/health.svg)

```
[![Health](https://phpackages.com/badges/ptadmin-admin/health.svg)](https://phpackages.com/packages/ptadmin-admin)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.8k2.5k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

28.0k175.2k9](/packages/bagisto-bagisto)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

4041.8k](/packages/codewithdennis-larament)[inovector/mixpost-enterprise-app

Standalone application with Mixpost Enterprise's Laravel package pre-installed and configured.

109.6k](/packages/inovector-mixpost-enterprise-app)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
