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(8mo ago)10MITPHPPHP &gt;=8.1

Since Oct 21Pushed 8mo agoCompare

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

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

30

—

LowBetter than 62% of packages

Maintenance60

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

255d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13313019?v=4)[Glugox](/maintainers/glugox)[@glugox](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/pulse

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

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M619](/packages/laravel-scout)[illuminate/notifications

The Illuminate Notifications package.

513.1M1.1k](/packages/illuminate-notifications)

PHPackages © 2026

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