PHPackages                             chhw/commander - 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. [CLI &amp; Console](/categories/cli)
4. /
5. chhw/commander

ActiveLibrary[CLI &amp; Console](/categories/cli)

chhw/commander
==============

This package gives you to automatically generate service/repository class, which is extended by Laravel original make commands.

2.1.0(4y ago)1636MITPHPPHP &gt;=5.4

Since Nov 24Pushed 4y agoCompare

[ Source](https://github.com/wangchristine/commander)[ Packagist](https://packagist.org/packages/chhw/commander)[ RSS](/packages/chhw-commander/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (16)Used By (0)

Laravel Commander
=================

[](#laravel-commander)

> This package extends Laravel generating commands.

Installation
============

[](#installation)

Install by composer

```
    $ composer require chhw/commander
```

If you are under Laravel 5.5, please add this code in `config/app.php` below.

```

```

Also support Lumen now!!
------------------------

[](#also-support-lumen-now)

In `bootstrap/app.php`, you should:

1. uncomment `$app->withEloquent();`
2. add `$app->register(CHHW\Commander\CommanderServiceProvider::class);`

And add `config/database.php` just like Laravel.

Usage
=====

[](#usage)

### Generate Service:

[](#generate-service)

> Create a new service class.

```
    $ php artisan make:service UserService
```

### Generate Repository:

[](#generate-repository)

> Create a new repository class.

```
    $ php artisan make:repository UserRepository
```

> Or you can create a new repository class with `--model=`

```
    $ php artisan make:repository UserRepository --model=User
```

Supported methods
=================

[](#supported-methods)

> You can use these methods in service:

1. all($columns = \['\*'\])
2. find($id, $columns = \['\*'\])
3. firstOrFail($columns = \['\*'\])
4. get($columns = \['\*'\])
5. create(array $attributes = \[\])
6. with($relations)
7. destroy($ids)
8. paginate($perPage = null, $columns = \['\*'\], $pageName = 'page', $page = null)
9. simplePaginate($perPage = null, $columns = \['\*'\], $pageName = 'page', $page = null)

### Example:

[](#example)

app/Services/UserService.php

```
protected $userRepository;

public function __construct(UserRepository $repository)
{
    $this->userRepository = $repository;
}

public function getAll()
{
    return $this->userRepository->all();
}

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Recently: every ~123 days

Total

14

Last Release

1674d ago

Major Versions

1.0.2 → 2.0.02020-03-22

PHP version history (3 changes)1.0.0PHP ^7.0.0

2.0.6PHP ^5.4

2.0.7PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899296?v=4)[wangchristine](/maintainers/wangchristine)[@wangchristine](https://github.com/wangchristine)

---

Top Contributors

[![wangchristine](https://avatars.githubusercontent.com/u/13899296?v=4)](https://github.com/wangchristine "wangchristine (21 commits)")

---

Tags

commandcommanderlaravellaravellumencommandgenerate

### Embed Badge

![Health badge](/badges/chhw-commander/health.svg)

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.4k](/packages/larastan-larastan)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)

PHPackages © 2026

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