Download the PHP package a909m/filament-statefusion without Composer

On this page you can find all versions of the php package a909m/filament-statefusion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-statefusion

Filament-StateFusion

Brings the full power of Spatie Laravel Model States to Filament with zero complexity and beautiful visual workflows.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Filament StateFusion is a powerful FilamentPHP plugin that seamlessly integrates Spatie Laravel Model States into the Filament admin panel. Effortlessly manage model states, transitions, and filtering within Filament, enhancing both user experience and developer productivity.

Perfect for order processing, publishing workflows, approval systems, and any application requiring well-defined state management.


Features

Rich State Management

🛠 Developer Experience

🎨 Customizable Interface


🎬 Preview

📸 Screenshots and demo GIFs will be added soon


Requirements

This plugin is designed to work with the following dependencies:

Installation

Install the package via Composer:

Plugin Version Filament Version Readme
1.x 3.x Link
2.x 4.x 5.x Link

Upgrading to Filament v4

Then, implement the HasFilamentStateFusion interface and use the StateFusionInfo trait on your abstract state class.

Finally, you can start using the components and actions provided by this plugin in your Filament resources.


Understanding State Management

This plugin builds on Spatie Laravel Model States, which provides:

Example: An order can be Pending, Processing, Shipped, or Cancelled. You define:

StateFusion makes these states visual and interactive in Filament with dropdowns, badges, filters, and action buttons.


Getting Started

1. Prepare Your State Classes

First, ensure you have Spatie Laravel Model States configured. Then implement the HasFilamentStateFusion interface and use the StateFusionInfo trait on your abstract state class:

New to Spatie Laravel Model States? Read their introduction first to understand states, transitions, and the state pattern.

2. Configure Your Model

Add the state to your Eloquent model:

3. Use in Filament Resources

Now you can use StateFusion components in your Filament resources:

Usage

Form Components

You can use the following state-aware components in your forms:

Table Columns


StateFusionSelectColumn

Display state information in your Filament tables and allow for quick state transitions.

TextColumn

You can also use the standard TextColumn to display the state as a badge. When your state classes implement HasLabel, HasColor, and HasIcon interfaces, the badge will automatically display the appropriate label, color, and icon without any additional configuration.

Table Filter

Filter records by state:

Table Actions

StateFusionTableAction

Add state transition actions to your table rows.

StateFusionBulkAction

Transition multiple records at once.

Infolist Entries

TextEntry

Similar to the table column, you can use the standard TextEntry in your infolists to display the model state as a badge. When your state classes implement HasLabel, HasColor, and HasIcon interfaces, the badge will automatically display the appropriate label, color, and icon without any additional configuration.

Page Actions

StateFusionAction

Create actions to transition between states from a page.


Customization

Custom Attributes

By default, the state components use the first attribute defined in your model's getDefaultStates() as the state attribute. If your model uses a different attribute name or you want to specify which attribute to use, you can set it using the attribute() method.

This is useful when your model has multiple state attributes or you want to reuse the component for different attributes.

Customizing States

To customize how states appear in the UI, implement the HasLabel, HasDescription, HasColor, or HasIcon interfaces on your concrete state classes:

Customizing Transitions

Similarly, transitions can be customized by implementing the same interfaces:

Custom Transitions with Forms

Sometimes you need to collect additional information when transitioning between states. StateFusion makes this easy by letting you add a form() method to your custom transition classes.

Example: Cancelling an order with a reason

The form data is automatically passed to your transition's $data parameter, which you can then use in the handle() method to update your model.

Learn more: Custom Transition Classes in the Spatie documentation.


Testing


Changelog

Please see CHANGELOG for more information on what has changed recently.


Contributing

Please see CONTRIBUTING for details on how to contribute to this project.


Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.


Credits


License

The MIT License (MIT). Please see License File for more information.


All versions of filament-statefusion with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
spatie/laravel-model-states Version ^2.10
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package a909m/filament-statefusion contains the following files

Loading the files please wait ...