PHPackages                             cqcqs/laravel-mode - 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. cqcqs/laravel-mode

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

cqcqs/laravel-mode
==================

Laravel Development Mode

v2.6(3y ago)042MITPHPPHP &gt;=7.2.5

Since Aug 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cqcqs/laravel-mode)[ Packagist](https://packagist.org/packages/cqcqs/laravel-mode)[ RSS](/packages/cqcqs-laravel-mode/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

laravel-mode
============

[](#laravel-mode)

基于 `laravel` 的项目开发规范，以面向对象思维开发

Laravellaravel-mode7.0V2.08.0V2.0### Install

[](#install)

```
composer require cqcqs/laravel-mode

```

### Use

[](#use)

#### Provider

[](#provider)

```
Cqcqs\Mode\ModeServiceProvider::class
```

#### DTO

[](#dto)

数据传输层，`Controller` 与 `Service` 之间通信的数据传输

```
# 生成 DTO
php artisan make:dto PostDTO

```

```
use App\DTO\PostDTO;

$postDTO = new PostDTO([
    'title' => $request->post('title')
]);

// or

$postDTO = new PostDTO();
$postDTO->setTitle($request->post('title'));

```

#### Service

[](#service)

业务逻辑层

```
# 生成 Service
php artisan make:service PostService

```

```
return ServiceHelper::make('Api\\PostService')->store($postDTO);

```

#### Repository

[](#repository)

数据映射层

```
# 生成 Repository
php artisan make:repository PostRepository --model=App\Models\Post

```

```
use Cqcqs\Mode\Helpers\ResponseHelper;
use App\Repositories\PostRepository;

public function __construct(PostRepository $post)
{
    $this->post = $post;
}

public function store(PostDTO $postDTO)
{
    $list = $this->post->insert($postDTO->toArray());

    return new ResponseHelper();
}

```

### Links

[](#links)

**Blog：**[Stephen Blog](https://www.stephen520.cn/)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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 ~69 days

Recently: every ~124 days

Total

11

Last Release

1457d ago

Major Versions

v1.x-dev → v2.12020-09-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/2eb0d0f1dfb3894d80d020edf352652fe543a1bc076d91e30f5215aac4a101c5?d=identicon)[cqcqs](/maintainers/cqcqs)

---

Top Contributors

[![cqcqs](https://avatars.githubusercontent.com/u/17697413?v=4)](https://github.com/cqcqs "cqcqs (13 commits)")

---

Tags

laravelservicerepositorydtomode

### Embed Badge

![Health badge](/badges/cqcqs-laravel-mode/health.svg)

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

PHPackages © 2026

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