PHPackages                             jasperfernandez/laraflow - 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. [Framework](/categories/framework)
4. /
5. jasperfernandez/laraflow

ActiveLibrary[Framework](/categories/framework)

jasperfernandez/laraflow
========================

Workflow engine for Laravel

v1.0.0(2mo ago)00[1 PRs](https://github.com/jasperfernandez/laraflow/pulls)MITPHPPHP ^8.3CI passing

Since Apr 7Pushed 4d agoCompare

[ Source](https://github.com/jasperfernandez/laraflow)[ Packagist](https://packagist.org/packages/jasperfernandez/laraflow)[ Docs](https://github.com/jasperfernandez/laraflow)[ GitHub Sponsors](https://github.com/jasperfernandez)[ RSS](/packages/jasperfernandez-laraflow/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

jasperfernandez/laraflow
========================

[](#jasperfernandezlaraflow)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f21e8a36fffe4c24502632de6d6513c08580abfa6aa9f9d84741515ab8363f79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61737065726665726e616e64657a2f6c617261666c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasperfernandez/laraflow)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f27922399af785e7abb3c6a1e656fdc992769ae8add9eca268f22d7004bf5694/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a61737065726665726e616e64657a2f6c617261666c6f772f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jasperfernandez/laraflow/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ec1393d40518be02b422bec919bcdb8b2b35686c7b1b7844ef5e6dd72bcf3656/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a61737065726665726e616e64657a2f6c617261666c6f772f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jasperfernandez/laraflow/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b6ddf63ce528693833b687c12771817ec13b0424a5e46932ecc3b349d6c4eb84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61737065726665726e616e64657a2f6c617261666c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasperfernandez/laraflow)

Laraflow is a workflow engine for Laravel applications. It lets you define workflow templates with ordered steps, assign roles to each step, configure allowed actions, and run workflow instances against any Eloquent model.

It is a good fit for application flows such as membership approvals, onboarding, request routing, document review, or any process that needs step history, assignments, status transitions, and audit trails.

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

[](#installation)

Install the package with Composer:

```
composer require jasperfernandez/laraflow
```

Publish and run the package migrations:

```
php artisan vendor:publish --tag="laraflow-migrations"
php artisan migrate
```

Publish the config file:

```
php artisan vendor:publish --tag="laraflow-config"
```

Before You Start
----------------

[](#before-you-start)

Laraflow manages workflow templates, workflow instances, workflow steps, assignments, and transitions. Your application is responsible for the domain records that Laraflow references:

- roles
- statuses
- actions
- the subject model you want to attach a workflow to

By default, the package checks whether the acting user can execute a step by calling `hasRole(string $role)` on the authenticated user model. If your user model does not expose that method, the default authorization will deny the action.

Configuration
-------------

[](#configuration)

After publishing the config, point the package at your own role, status, and action models:

```
