PHPackages                             zhenghaoke/laravel-tool - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zhenghaoke/laravel-tool

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zhenghaoke/laravel-tool
=======================

v1.2.6.5(3y ago)175MITPHPPHP ^7.4

Since Jun 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/haoke12138/laravel-tool)[ Packagist](https://packagist.org/packages/zhenghaoke/laravel-tool)[ RSS](/packages/zhenghaoke-laravel-tool/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (30)Used By (0)

使用Laraval Tool
--------------

[](#使用laraval-tool)

`composer require zhenghaoke/laravel-tool`

将 `ToolServiceProvider.php`在`app.php`中的`providers`引入

关于Laravel Tool
--------------

[](#关于laravel-tool)

- 1.帮助函数, 位于 `src/Common/helper.php`
- 2.模型自动加载
    使用方法

```
model('User', ["name" => '张三']);
model('User');
```

- 3.Service自动加载

```
service('User');
```

- 4.Dcat Admin 仓库自动加载

```
repository('User', ['orders']);
repository('User');
```

- 5.artisan命令 生成多语言表
- 6.artisan命令 生成数据库表结构文档

#### 自动加载使用方法和规则

[](#自动加载使用方法和规则)

使用方式如下

```
    private function getModel(array $param = [])
    {
        return model('Navigation', $param); // 类似于 new /App/Models/Navigation($param) 不过使用的是他的一个单例
        // 第二个参数为目标在Models的相对命名空间并用.相连接
        // 如 命名空间为 \App\Models\Navigation, 则填写 Navigation
        // 如 命名空间为 \App\Models\Nav\Navigation, 则填写 Nav.Navigation

         // 调用service使用 命名空间为 \App\Services\Navigation, 则填写 Navigation
         // 调用repository使用 命名空间为 \App\Admin\Repositories\Navigation, 则填写 Navigation
    }

- 7.添加stub创建模板, 若有使用dcat会替换掉原有的dcat的model.stub和repository.stub

- 8.添加中文翻译文件

- 9.添加api的Request文件
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.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 ~12 days

Recently: every ~43 days

Total

28

Last Release

1098d ago

Major Versions

v0.1.3 → v1.0.02022-08-11

PHP version history (2 changes)v0.1PHP 7.\*

v1.2.6.4PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0488325a2f50985c4b7252540b24d6bece60f99339d5bf46b2499d80213714e1?d=identicon)[浩克](/maintainers/%E6%B5%A9%E5%85%8B)

---

Top Contributors

[![haoke12138](https://avatars.githubusercontent.com/u/63644345?v=4)](https://github.com/haoke12138 "haoke12138 (46 commits)")[![gaoyanan81](https://avatars.githubusercontent.com/u/26830532?v=4)](https://github.com/gaoyanan81 "gaoyanan81 (1 commits)")

### Embed Badge

![Health badge](/badges/zhenghaoke-laravel-tool/health.svg)

```
[![Health](https://phpackages.com/badges/zhenghaoke-laravel-tool/health.svg)](https://phpackages.com/packages/zhenghaoke-laravel-tool)
```

###  Alternatives

[laraveljutsu/zap

A flexible, performant, and developer-friendly schedule management system for Laravel

1.4k69.1k](/packages/laraveljutsu-zap)[jxlwqq/json-editor

JSON Editor for Laravel-admin

32101.8k](/packages/jxlwqq-json-editor)

PHPackages © 2026

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