PHPackages                             andyantunes/helper-commands - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. andyantunes/helper-commands

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andyantunes/helper-commands
===========================

Helper to automate the creation of observers to Models

v2.0.4(1y ago)7116MITPHPPHP ^8.1

Since Aug 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andyantunes/helper-commands)[ Packagist](https://packagist.org/packages/andyantunes/helper-commands)[ Docs](https://github.com/andyantunes/helper-commands)[ RSS](/packages/andyantunes-helper-commands/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)DependenciesVersions (13)Used By (0)

Helper Commands
===============

[](#helper-commands)

Commands to help in the development of laravel projects

[![Latest Stable Version](https://camo.githubusercontent.com/5a5b91375e1de8ca2ee8543e89ddb810000016530d32d4b66086f4cdf5211db5/68747470733a2f2f706f7365722e707567782e6f72672f616e6479616e74756e65732f68656c7065722d636f6d6d616e64732f76657273696f6e2e737667)](https://packagist.org/packages/andyantunes/helper-commands)[![Total Downloads](https://camo.githubusercontent.com/1059dc4275d871e9aa8b904e6e7b18a6a8b649ed767a3ce53b1c8ddc5e9ba6d7/68747470733a2f2f706f7365722e707567782e6f72672f616e6479616e74756e65732f68656c7065722d636f6d6d616e64732f646f776e6c6f616473)](https://packagist.org/packages/andyantunes/helper-commands)[![PHP Version Require](https://camo.githubusercontent.com/f3436da829c34a8a9530a8913d997b7520f5345db2dcc6a1b4ce8478af618ec9/68747470733a2f2f706f7365722e707567782e6f72672f616e6479616e74756e65732f68656c7065722d636f6d6d616e64732f726571756972652f706870)](https://packagist.org/packages/andyantunes/helper-commands)[![License](https://camo.githubusercontent.com/0ca1eaf89806f48fc9f0b2dd61b81f57227d8aea85667feea3c02113da53df0c/68747470733a2f2f706f7365722e707567782e6f72672f616e6479616e74756e65732f68656c7065722d636f6d6d616e64732f6c6963656e7365)](https://packagist.org/packages/andyantunes/helper-commands)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Activity Log](#activity-log)
- [Observer](#observer)
- [Factories](#factories)
- [License](#license)

Installation
------------

[](#installation)

Install the package via composer

```
composer require andyantunes/helper-commands --dev
```

Publish the `migration` to use the `Log Activities` and the `config/helper-commands.php` config file

```
php artisan vendor:publish --provider="AndyAntunes\\HelperCommands\\HelperCommandsServiceProvider"
```

Before running migration

- Check the configuration file `config/helper-commands.php` and change the configurations if you need

Run the migration

```
php artisan migrate
```

Activity Log
------------

[](#activity-log)

To generate the classes and methods use this command

```
php artisan helper:activity
```

and select the Model which you use to generate the Observer.

Observer
--------

[](#observer)

The observer class is generated with the following methods

```
public function created(MyModel $myModel): void
{
    $action = "Criou o myModel de ID: {$myModel->id}";
    LogActivity::setAction($action)
        ->create();
}
```

```
public function updated(MyModel $myModel): void
{
    $action = "Atualizou o myModel de ID: {$myModel->id}";
    LogActivity::setAction($action)
        ->create();
}
```

```
public function deleted(MyModel $myModel): void
{
    $action = "Deletou o myModel de ID: {$myModel->id}";
    LogActivity::setAction($action)
        ->create();
}
```

```
public function restored(MyModel $myModel): void
{
    $action = "Restaurou o myModel de ID: {$myModel->id}";
    LogActivity::setAction($action)
        ->create();
}
```

```
public function forceDeleted(MyModel $myModel): void
{
    $action = "Removeu o myModel de ID: {$myModel->id}";
    LogActivity::setAction($action)
        ->create();
}
```

Factories
---------

[](#factories)

To generate factories based in your table use this command

```
php artisan helper:factory
```

and select options like `ModelName`, `quantity` of records and whether to have events `withEvents`

Example of the created Factory

```
User::withoutEvents(function () {
    $this->command->warn(PHP_EOL . 'Creating users...');

    $this->withProgressBar(7, fn () => User::factory(1)->create());

    $this->command->info('Users created.');
});
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

8

Last Release

565d ago

Major Versions

v1.0.3 → v2.0.02024-09-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/09e6f387ce1951037bd51c6e6baca65355559d668a097e8c05c61bca0dd7870e?d=identicon)[andyantunes](/maintainers/andyantunes)

---

Top Contributors

[![andyantunes](https://avatars.githubusercontent.com/u/48885210?v=4)](https://github.com/andyantunes "andyantunes (61 commits)")

---

Tags

laravellaravel-helperandyantunes

### Embed Badge

![Health badge](/badges/andyantunes-helper-commands/health.svg)

```
[![Health](https://phpackages.com/badges/andyantunes-helper-commands/health.svg)](https://phpackages.com/packages/andyantunes-helper-commands)
```

###  Alternatives

[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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