Download the PHP package istvan0304/laravel-workflow without Composer
On this page you can find all versions of the php package istvan0304/laravel-workflow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download istvan0304/laravel-workflow
More information about istvan0304/laravel-workflow
Files in istvan0304/laravel-workflow
Download istvan0304/laravel-workflow
More information about istvan0304/laravel-workflow
Files in istvan0304/laravel-workflow
Please rate this library. Is it a good library?
Informations about the package laravel-workflow
Laravel workflow
Installion
composer require istvan0304/laravel-workflow
Configuration
Attach Workflow behavior into your Model.
`
Default workflow attribute is "status" but you can overwrite it in your Model like:
`
Add observer to the EventServiceProvider:
`
Create a workflow
A workflow is defined as a PHP class that implements the ` interface which declares three functions:
- statusLabels() // This method must return an array representing the workflow status names.
- statusActionLabels() // This method must return an array representing the workflow status action names.
- getDefinition() // This method must return an array representing the workflow definition.
Example workflow class:
`
Start workflow
`
Change status
`
If no transition between two status you are going to get an Exception.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-workflow with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
The package istvan0304/laravel-workflow contains the following files
Loading the files please wait ....