PHPackages                             yuyue8/tp-project-cores - 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. yuyue8/tp-project-cores

ActiveLibrary[Framework](/categories/framework)

yuyue8/tp-project-cores
=======================

thinkphp project cores thinkphp项目核心功能

v2.0.3(1y ago)029Apache-2.0PHPPHP &gt;=8.0.2

Since Jun 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/yuyue8/tp-project-cores)[ Packagist](https://packagist.org/packages/yuyue8/tp-project-cores)[ RSS](/packages/yuyue8-tp-project-cores/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (22)Used By (0)

TpProjectCores
==============

[](#tpprojectcores)

安装
--

[](#安装)

```
composer require yuyue8/tp-project-cores

```

使用流程
----

[](#使用流程)

#### 配置

[](#配置)

在`tp_config`配置文件中设置

`project_cores_namespace`：值为`cacge`、`dao`、`model`、`services`、`validate`类的域名空间，默认为`app``controller_default_namespace`：值为`controller`类的域名空间，默认为`app/controller``base_controller`：值为`controller`所需继承的基类，默认为`\app\BaseController::class`

#### 创建命令

[](#创建命令)

使用下面命令会创建`cacge`、`dao`、`model`、`services`、`validate`、`controller`类

```
php think make:cores admin/admin_user

```

`admin` 为在那个目录下 `admin_user`为表名

#### 参数过滤

[](#参数过滤)

另外内置了参数值安全过滤，可以修改 `app\Request` 的继承类为 `Yuyue8\TpProjectCores\Request`, 在使用`goCheck` 方法时，可以传入过滤规则进行过滤

过滤规则示例(第一个参数必须，其他可以不写)： \[ \['name', '', '' , ''\] #参数名，默认值，过滤方法，重命名 \[\['num', 'd'\], 0\] #\[参数名，变量修饰符\]，默认值 \]

#### 数据缓存

[](#数据缓存)

在`env`文件内设置`cache.enable`值为`true`时开启数据缓存， 在`cache`类中按照`getIdToInfo`方法，仿写其他方法，获取缓存数据， 在`cache`类的`deleteCache`方法中删除缓存数据

内置了缓存数据更新消息队列类`\Yuyue8\TpProjectCores\cache\UpdateModelCacheJobs`，只需要运行此类，在新增、编辑、删除数据时，相关缓存将会自动删除

若需要自定义缓存处理，可以在`BaseModel`和`BaseCache`中重置相关方法即可

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~20 days

Recently: every ~29 days

Total

21

Last Release

664d ago

Major Versions

v1.0.16 → v2.0.02024-03-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/53282d9e2a3bfccaf3b02ed4e2f1ede03c83141441299709b10a47d6392cc25a?d=identicon)[yuyue8](/maintainers/yuyue8)

---

Top Contributors

[![yuyue8](https://avatars.githubusercontent.com/u/48197835?v=4)](https://github.com/yuyue8 "yuyue8 (23 commits)")

### Embed Badge

![Health badge](/badges/yuyue8-tp-project-cores/health.svg)

```
[![Health](https://phpackages.com/badges/yuyue8-tp-project-cores/health.svg)](https://phpackages.com/packages/yuyue8-tp-project-cores)
```

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[topthink/think-swoole

Swoole extend for thinkphp

477174.4k19](/packages/topthink-think-swoole)[topthink/think-throttle

throttle middleware for thinkphp8

18993.1k2](/packages/topthink-think-throttle)[jaguarjack/catchadmin

The CatchAdmin Background management

8962.6k](/packages/jaguarjack-catchadmin)[topthink/think-multi-app

thinkphp multi app support

26813.1k50](/packages/topthink-think-multi-app)

PHPackages © 2026

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