PHPackages                             yuanben/laravel-command-once - 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. yuanben/laravel-command-once

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

yuanben/laravel-command-once
============================

execute command only once

v0.0.7(8y ago)31.0kMITPHP

Since Apr 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/yuanbenio/laravel-command-once)[ Packagist](https://packagist.org/packages/yuanben/laravel-command-once)[ RSS](/packages/yuanben-laravel-command-once/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (7)Used By (0)

Yuanben Command Once
====================

[](#yuanben-command-once)

Installion
----------

[](#installion)

To get started with Command Once, add to your `composer.json` file as a dependency:

```
composer require yuanben/laravel-command-once

```

Configure
---------

[](#configure)

After installing the Command Once library, register the `Yuanben\CommandOnce\CommandOnceServiceProvider` in your `config/app.php` configuration file:

```
'providers' => [
    // Other service providers...

    Yuanben\CommandOnce\CommandOnceServiceProvider::class,
]

```

Publish
-------

[](#publish)

Next, you need execute publish command:

```
php artisan vendor:publish

```

This command will publish `command.php` config file to you application config directory. also, it will publish create command once table migration file to you migration directory. So, you also need to do migrate:

```
php artisan migrate

```

Usage
-----

[](#usage)

Within `command.php` file, you need list what commands do you want execute just only once:

```
return [
    'execs' => [
        'storage:link' => 'v0.0.1',
        'db:seed' => 'my version',
        'cache:clear {--help:} {store:redis} => 'version',
        '!ls -al' => 'version'
    ]
];

```

Then you can execute command like this:

```
php artisan command:once

```

This command will compare the listed command and version above with the database, if they never executed, the command will do it for you.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

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

Total

6

Last Release

3284d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3bcdb883ac5a8d3b050d97645820260d1bde745f6aa234b38849b78b3e4cdea6?d=identicon)[yuanben](/maintainers/yuanben)

---

Top Contributors

[![DearMadMan](https://avatars.githubusercontent.com/u/6621779?v=4)](https://github.com/DearMadMan "DearMadMan (8 commits)")

---

Tags

laravelcommand-once

### Embed Badge

![Health badge](/badges/yuanben-laravel-command-once/health.svg)

```
[![Health](https://phpackages.com/badges/yuanben-laravel-command-once/health.svg)](https://phpackages.com/packages/yuanben-laravel-command-once)
```

PHPackages © 2026

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