PHPackages                             webman-tech/laravel-console - 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. webman-tech/laravel-console

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

webman-tech/laravel-console
===========================

Webman plugin webman-tech/laravel-console

v12.0.12(5mo ago)5873MITPHPPHP ^8.2

Since Apr 25Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/webman-tech/laravel-console)[ Packagist](https://packagist.org/packages/webman-tech/laravel-console)[ RSS](/packages/webman-tech-laravel-console/feed)WikiDiscussions 12.x Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (21)Used By (0)

webman-tech/laravel-console
===========================

[](#webman-techlaravel-console)

> Split from [webman-tech/laravel-monorepo](https://github.com/webman-tech/laravel-monorepo)

适用于 webman 的 Laravel 控制台组件，基于 illuminate/console 实现。

安装
--

[](#安装)

```
composer require webman-tech/laravel-console
```

如果需要同时使用 webman/console 的命令，还需要安装：

```
composer require webman/console
```

简介
--

[](#简介)

该组件将 Laravel 强大的 Artisan 命令行功能引入 webman 框架中，使开发者能够使用 Laravel 的命令行语法创建和管理命令。

所有方法和配置与 Laravel 几乎一致，因此使用方式可完全参考 [Laravel Artisan 文档](https://laravel.com/docs/artisan)。

特殊使用说明
------

[](#特殊使用说明)

### 1. 为什么会有这个扩展

[](#1-为什么会有这个扩展)

相比于官方的 [webman/console](https://packagist.org/packages/webman/console)：

1. 基于 illuminate/console，使用更方便
2. 给用惯了 Laravel 的人一个熟悉的环境
3. 支持第三方 Laravel 包的命令直接使用
4. 支持 illuminate/database 的 Migration 相关功能

### 2. Facades 使用方式

[](#2-facades-使用方式)

使用 `WebmanTech\LaravelConsole\Facades\Artisan` 替代 Laravel 的 Artisan Facade：

```
use WebmanTech\LaravelConsole\Facades\Artisan;

// 调用命令
Artisan::call('mail:send', [
    'userId' => 123
]);
```

### 3. 命令扫描配置

[](#3-命令扫描配置)

默认自动扫描 `app\command` 下的命令。

配置文件：`config/plugin/webman-tech/laravel-console/artisan.php`

```
return [
    // 自定义命令扫描路径
    'commands_path' => [
        app_path() . '/MyCommands' => 'app\MyCommands',
    ],

    // 直接注册命令类
    'commands' => [
        \App\Commands\MyCommand::class,
    ],
];
```

### 4. 创建命令

[](#4-创建命令)

```
namespace app\command;

use Illuminate\Console\Command;

class SendEmails extends Command
{
    protected $signature = 'mail:send {userId}';

    protected $description = 'Send a marketing email to a user';

    public function handle(): void
    {
        // 处理逻辑
    }
}
```

### 5. 调用命令

[](#5-调用命令)

命令行调用：

```
php artisan mail:send 1
```

业务中调用：

```
use WebmanTech\LaravelConsole\Facades\Artisan;

Artisan::call('mail:send', ['userId' => 1]);
```

注意事项
----

[](#注意事项)

### 当使用 db:seed 报错 "Target class \[Database\\Seeders\\Xxxx\] does not exist" 时

[](#当使用-dbseed-报错-target-class-databaseseedersxxxx-does-not-exist-时)

解决办法：主动在 `composer.json` 中添加 psr-4 的配置，详见 [issue-9](https://github.com/webman-tech/laravel-console/issues/9)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance70

Regular maintenance activity

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

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

Recently: every ~1 days

Total

20

Last Release

173d ago

Major Versions

v1.0.4 → 11.0.02025-06-04

v11.0.2 → v12.0.42025-06-04

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

11.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4053cfc9956b8c15b9bc4c9c7c2bad625d16d1b6d9191019b2a25cc0972d955?d=identicon)[kriss](/maintainers/kriss)

---

Top Contributors

[![krissss](https://avatars.githubusercontent.com/u/10680903?v=4)](https://github.com/krissss "krissss (22 commits)")

### Embed Badge

![Health badge](/badges/webman-tech-laravel-console/health.svg)

```
[![Health](https://phpackages.com/badges/webman-tech-laravel-console/health.svg)](https://phpackages.com/packages/webman-tech-laravel-console)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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