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)2724MITPHPPHP &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 yesterday

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 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

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

1719d 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.1k4.6M321](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

20433.0M1.8k](/packages/illuminate-queue)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1614.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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