PHPackages                             bekwoh/laravel-action - 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. bekwoh/laravel-action

Abandoned → [https://github.com/cleaniquecoders/laravel-action](/?search=https%3A%2F%2Fgithub.com%2Fcleaniquecoders%2Flaravel-action)Library[Utility &amp; Helpers](/categories/utility)

bekwoh/laravel-action
=====================

Simple Actionable for Laravel

2.3.0(1mo ago)5698[4 PRs](https://github.com/cleaniquecoders/laravel-action/pulls)MITPHPPHP ^8.2 | ^8.3 | ^8.4CI passing

Since Sep 11Pushed 1mo agoCompare

[ Source](https://github.com/cleaniquecoders/laravel-action)[ Packagist](https://packagist.org/packages/bekwoh/laravel-action)[ Docs](https://github.com/cleaniquecoders/laravel-action)[ RSS](/packages/bekwoh-laravel-action/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (30)Versions (25)Used By (0)

Simple Actionable for Laravel
=============================

[](#simple-actionable-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/88b2ed2f40a775244623297ab44c145505172c70736585ace93b1743400c5555/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c65616e69717565636f646572732f6c61726176656c2d616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/laravel-action) [![PHPStan](https://github.com/cleaniquecoders/laravel-action/actions/workflows/phpstan.yml/badge.svg)](https://github.com/cleaniquecoders/laravel-action/actions/workflows/phpstan.yml) [![run-tests](https://github.com/cleaniquecoders/laravel-action/actions/workflows/run-tests.yml/badge.svg)](https://github.com/cleaniquecoders/laravel-action/actions/workflows/run-tests.yml) [![Fix PHP code style issues](https://github.com/cleaniquecoders/laravel-action/actions/workflows/fix-styling.yml/badge.svg)](https://github.com/cleaniquecoders/laravel-action/actions/workflows/fix-styling.yml) [![Total Downloads](https://camo.githubusercontent.com/7aca7cc3d4025ec77993c7e403ddc74ebacddbfb8facf93daa0918f2d03ede5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c65616e69717565636f646572732f6c61726176656c2d616374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/laravel-action)

This package, **Simple Actionable for Laravel**, provides a structured way to manage action classes in your Laravel applications, making it easier to encapsulate business logic, transformations, and validations within reusable classes. The package utilizes [lorisleiva/laravel-actions](https://github.com/lorisleiva/laravel-actions) to offer extended functionality, enabling actions to be executed in multiple contexts (e.g., jobs, controllers, event listeners) and simplifying your codebase.

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

[](#installation)

You can install the package via composer:

```
composer require cleaniquecoders/laravel-action
```

Features
--------

[](#features)

This package builds on top of `lorisleiva/laravel-actions`, allowing you to:

- Create versatile action classes that can be executed as invokable objects, controllers, or dispatched as jobs.
- Use property setters to configure actions dynamically.
- Apply transformations like hashing or encryption to specific fields.
- Manage `updateOrCreate` behavior with constraints on unique fields.

Usage
-----

[](#usage)

You can create an action using the Artisan command:

```
php artisan make:action User\\CreateOrUpdateUser --model=User
```

This will create an action in `app\Actions\User`:

```
