PHPackages                             aliheidarian1984/filament-queueable-stack-actions-legal - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. aliheidarian1984/filament-queueable-stack-actions-legal

ActiveLibrary[Queues &amp; Workers](/categories/queues)

aliheidarian1984/filament-queueable-stack-actions-legal
=======================================================

This Filament plugin simplifies managing stack operations asynchronously in a queue. It provides tracking and status updates for tasks, while supporting both action calls and job dispatches. Excellent for stack data updates and tasks with Filament &amp; Livewire support for real-time notifications.

07PHP

Since Nov 26Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

This is my package queueable-stack-actions
==========================================

[](#this-is-my-package-queueable-stack-actions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/96288fad8c4aec438d065721945a9bfef664e7d7ae9e971e009f8e9506b8e8eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6968656964617269616e313938342f717565756561626c652d737461636b2d616374696f6e732d6c6567616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aliheidarian1984/queueable-stack-actions-legal)[![Total Downloads](https://camo.githubusercontent.com/5e73d6672d03c4425a3919cb53c85c92b724f6fc6776e53cff73de8f3f656b43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6968656964617269616e313938342f717565756561626c652d737461636b2d616374696f6e732d6c6567616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aliheidarian1984/queueable-stack-actions-legal)

This Filament plugin simplifies managing stack operations asynchronously in a queue. It provides tracking and status updates for tasks, while supporting both action calls and job dispatches. Excellent for stack data updates and tasks with Filament &amp; Livewire support for real-time notifications.

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

[](#installation)

You can install the package via composer:

```
composer require aliheidarian1984/queueable-stack-actions-legal
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="queueable-stack-actions-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="queueable-stack-actions-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="queueable-stack-actions-views"
```

Usage
-----

[](#usage)

First you will need to register this plugin on your Filament panel

```
use \Aliheidarian1984\QueueableStackActionsLegal\QueueableStackActionsPlugin;
use Filament\View\PanelsRenderHook;
\Aliheidarian1984\QueueableStackActionsLegal\Enums\StatusEnum;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            QueueableStackActionsPlugin::make()
                ->stackActionModel(YourStackActionModel::class) // (optional) - Allows you to register your own model which extends \Aliheidarian1984\QueueableStackActionsLegal\Models\StackAction
                ->stackActionRecordModel(YourStackActionRecordModel::class) // (optional) - Allows you to register your own model for records which extends \Aliheidarian1984\QueueableStackActionsLegal\Models\StackActionRecord
                ->renderHook(PanelsRenderHook::RESOURCE_PAGES_LIST_RECORDS_TABLE_BEFORE) // (optional) - Allows you to change where notification is rendered, multiple render hooks can be passed as array [Default: PanelsRenderHook::RESOURCE_PAGES_LIST_RECORDS_TABLE_BEFORE]
                ->pollingInterval('5s') // (optional) - Allows you to change or disable polling interval, set to null to disable. [Default: 5s]
                ->queue('redis', 'default')  // (optional) - Allows you to change which connection and queue should be used [Default: env('QUEUE_CONNECTION'), default]
                ->resource(YourStackActionResource::class) // (optional) - Allows you to change which resource should be used to display historical stack actions
                ->colors([
                    StatusEnum::QUEUED->value => 'slate',
                    StatusEnum::IN_PROGRESS->value => 'info',
                    StatusEnum::FINISHED->value => 'success',
                    StatusEnum::FAILED->value => 'danger',
                ]), // (optional) - Allows you to change notification and badge colors used for statuses. Uses filament colors defined in panel provider. [Default: as show in method]
        ]);
}
```

To start leveraging the benefits of this package, you'll initially create a job tailored to manage your unique stack action records. This specialized job should inherit from the `Aliheidarian1984\QueueableStackActionsLegal\Jobs\StackActionJob` class, enabling it to seamlessly employ the features of the package.

```
