PHPackages                             vertaalbureau-perfect/action-pattern - 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. vertaalbureau-perfect/action-pattern

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

vertaalbureau-perfect/action-pattern
====================================

Action for small code bits, usable in laravel

v0.2.5(2y ago)01.3kMITPHPPHP &gt;=7.4|^8.0|^8.1

Since May 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/VBPdevelopment/action-pattern)[ Packagist](https://packagist.org/packages/vertaalbureau-perfect/action-pattern)[ RSS](/packages/vertaalbureau-perfect-action-pattern/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Action Pattern
==============

[](#action-pattern)

Actions are meant to be very small, single purpose, bits of code.

Because of the small footprint actions are easy reusable.

Example use cases are:

- implementing third paty api calls
- Simple routine jobs

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

[](#installation)

```
composer require vertaalbureau-perfect/action-pattern
```

Creating an Action
------------------

[](#creating-an-action)

```
php artisan make:action [ActionName]
```

You can also create actions in sub namespaces:

```
php artisan make:action [SubNamespace]/[ActionName]
```

Actions are placed in your app/Actions folder.

Usage
-----

[](#usage)

Imagine a simple action to write something to the log:

```
class CreateLogAction extends AbstractAction
{
    public function handle($message)
    {
        Log::debug($message);
    }
}
```

And to use it we would simply call:

```
CreateLogAction::execute('Write me to the log please!');
```

Testing
-------

[](#testing)

For Testing purposes you can use the static fake method.

```
CreateLogAction::fake();
```

If your code depends on a return value from the action you can provide the return value in the fake method.

```
CreateLogAction::fake('Log Success');
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Recently: every ~223 days

Total

7

Last Release

916d ago

PHP version history (2 changes)v0.1PHP &gt;=7.4|8.0

v0.2.4PHP &gt;=7.4|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4edbebdb9453398c642356e17ef1cdaa0359fb69d0afa64d9cbfbb8b03bcbd6c?d=identicon)[vertaalbureauperfect](/maintainers/vertaalbureauperfect)

---

Tags

laravelactionsactionaction-pattern

### Embed Badge

![Health badge](/badges/vertaalbureau-perfect-action-pattern/health.svg)

```
[![Health](https://phpackages.com/badges/vertaalbureau-perfect-action-pattern/health.svg)](https://phpackages.com/packages/vertaalbureau-perfect-action-pattern)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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