PHPackages                             glugox/actions - 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. glugox/actions

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

glugox/actions
==============

Glugox Actions: Actions for Laravel with progress tracking and broadcasting.

v1.0.0(6mo ago)10MITPHPPHP &gt;=8.1

Since Oct 21Pushed 6mo agoCompare

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

READMEChangelogDependencies (9)Versions (2)Used By (0)

Glugox/Actions
==============

[](#glugoxactions)

Nova-like **Actions** for Laravel apps with **progress tracking** and **broadcasted live updates** (works great with Reverb/Echo).

- Define actions as simple classes.
- Run sync or queued.
- Track progress in `action_runs` table.
- Broadcast `ActionProgressUpdated` so your UI shows live progress.

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

[](#installation)

```
composer require glugox/actions
php artisan vendor:publish --provider="Glugox\Actions\ActionServiceProvider" --tag=config
php artisan migrate

```

### Configure Broadcasting (optional but recommended)

[](#configure-broadcasting-optional-but-recommended)

Enable a broadcast driver (e.g., Reverb, Pusher) in your app's `.env`. Example (Reverb):

```
BROADCAST_DRIVER=reverb
REVERB_APP_ID=local
REVERB_APP_KEY=local
REVERB_APP_SECRET=local
REVERB_SERVER_HOST=127.0.0.1
REVERB_SERVER_PORT=8080

```

Defining an Action
------------------

[](#defining-an-action)

```
use Glugox\Actions\Contracts\Action;
use Glugox\Actions\DTO\ActionContext;
use Glugox\Actions\Support\Progress;

class ExportUsers implements Action
{
    public function name(): string
    {
        return 'Export Users';
    }

    public function handle(ActionContext $ctx, Progress $progress): array
    {
        $users = \App\Models\User::query()->cursor();
        $count = \App\Models\User::count();
        $done = 0;

        foreach ($users as $u) {
            // ... export ...
            $done++;
            if ($done % 50 === 0) {
                $progress->update(intval($done / max($count,1) * 100), "Exported {$done}/{$count} users");
            }
        }

        return ['message' => 'Export done', 'file' => '/storage/exports/users.csv'];
    }
}

```

Triggering via HTTP
-------------------

[](#triggering-via-http)

POST `actions/run` with:

```
{
  "action": "App\\Actions\\ExportUsers",
  "queued": true,
  "params": { "format": "csv" },
  "targets": [1,2,3]
}

```

Response includes the `run_id`. Subscribe to the broadcast channel to get progress events:

```
private-action-run.{run_id}
event: Glugox\\Actions\\Events\\ActionProgressUpdated

```

Triggering programmatically
---------------------------

[](#triggering-programmatically)

```
use Glugox\Actions\ActionRunner;

$runner = app(ActionRunner::class);
$run = $runner->run(new ExportUsers(), params: ['format' => 'csv'], userId: auth()->id());
// or queued:
$run = $runner->dispatch(new ExportUsers(), params: ['format' => 'csv'], userId: auth()->id());

```

Security
--------

[](#security)

By default, **any** fully-qualified class implementing `Contracts\Action` can be invoked. You can restrict allowed actions by configuring `actions.allowed` in `config/actions.php`.

Events &amp; Channels
---------------------

[](#events--channels)

Event: `Glugox\Actions\Events\ActionProgressUpdated`
Channel: `private-action-run.{id}` (configurable).
Make sure you define the channel authorization callback in your app's `routes/channels.php`:

```
Broadcast::channel('private-action-run.{id}', function ($user, $id) {
    // Check that the user can view this run id
    return true; // Replace with your policy
});

```

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

209d ago

### Community

Maintainers

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

---

Top Contributors

[![glugox](https://avatars.githubusercontent.com/u/13313019?v=4)](https://github.com/glugox "glugox (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/glugox-actions/health.svg)

```
[![Health](https://phpackages.com/badges/glugox-actions/health.svg)](https://phpackages.com/packages/glugox-actions)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

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

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)

PHPackages © 2026

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