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)1604MITPHPPHP &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 1w 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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

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

1628d 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://www.gravatar.com/avatar/b269ecb6624f0ccd1b958966fd8e45d2c1c5f81e5b0aae2696bb3666fab9e8b5?d=identicon)[wangchristine](/maintainers/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

[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[illuminated/console-mutex

Mutex for Laravel Console Commands.

146938.2k1](/packages/illuminated-console-mutex)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)

PHPackages © 2026

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