PHPackages                             the42coders/workflows - 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. the42coders/workflows

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

the42coders/workflows
=====================

This Package allows you to automate your Laravel Application from your Backend.

0.0.19(2y ago)2652.3k68[6 issues](https://github.com/42coders/workflows/issues)MITJavaScriptPHP &gt;7.2

Since Sep 15Pushed 1y ago14 watchersCompare

[ Source](https://github.com/42coders/workflows)[ Packagist](https://packagist.org/packages/the42coders/workflows)[ Docs](https://github.com/42coders/workflows)[ RSS](/packages/the42coders-workflows/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (34)Used By (0)

Workflows add Drag &amp; Drop automation's to your Laravel application.
=======================================================================

[](#workflows-add-drag--drop-automations-to-your-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8af6a92dd76e1777d2656ef2abba61c3c7422ed352ae169860342eaf12ed5a84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468653432636f646572732f776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the42coders/workflows)[![Build Status](https://camo.githubusercontent.com/90356e2a76f76cc7c8303b708eb31b9c7b53e73255935262a872517271c93c17/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f3432636f646572732f776f726b666c6f77732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/42coders/workflows)[![Quality Score](https://camo.githubusercontent.com/03177ce0b5efee271488e7a4c120354a8e5938142defd09c9555c879883efd93/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3239353733393436352f736869656c64)](https://github.styleci.io/repos/295739465/shield)[![Total Downloads](https://camo.githubusercontent.com/f1a2018a1f29b2c98990626239358e652792cc12a391abdcfe4bfa927b44b2ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468653432636f646572732f776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the42coders/workflows)

[![Logo](https://github.com/42coders/workflows/raw/master/resources/img/42workflows.png?raw=true)](https://github.com/42coders/workflows/blob/master/resources/img/42workflows.png?raw=true)

The Workflow Package adds Drag &amp; Drop Workflows to your Laravel Application. A Workflow consists of Triggers and Tasks. The Trigger is responsible for starting a Workflow. The Tasks are single nodes of code execution. The package comes with some handy tasks bundled, but you can easily write your own as well.

[![Screenshot](resources/img/workflow_concept.png)](resources/img/workflow_concept.png)

If you are interested in news and updates

- Follow me on [Twitter](https://twitter.com/gwagwagwa) &amp;&amp; || register to our [Newsletter](https://workflows.42coders.com)

[Video Tutorial](http://www.youtube.com/watch?v=J-fplZGlTZI "Short Introduction Video")

[![Alt text](https://camo.githubusercontent.com/698a5a87dcce71cf6b06afa7b2c01600ec106999fc5727ad592014b1f7a51d15/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f4a2d66706c5a476c545a492f6d7164656661756c742e6a7067)](https://www.youtube.com/watch?v=J-fplZGlTZI)

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

[](#installation)

You can install the package via composer:

```
composer require the42coders/workflows
```

You need to register the routes to your web.php routes File as well. Since the Workflow Package is very powerful make sure to secure the routes with whatever authentication you use in the rest of your app.

```
Route::group(['middleware' => ['auth']], function () {
    \the42coders\Workflows\Workflows::routes();
});
```

You need to publish the assets of the Package

```
php artisan vendor:publish --provider="the42coders\Workflows\WorkflowsServiceProvider"  --tag=assets
```

Other publishable Contents are

config

```
php artisan vendor:publish --provider="the42coders\Workflows\WorkflowsServiceProvider"  --tag=config
```

language

```
php artisan vendor:publish --provider="the42coders\Workflows\WorkflowsServiceProvider"  --tag=lang
```

views

```
php artisan vendor:publish --provider="the42coders\Workflows\WorkflowsServiceProvider"  --tag=views
```

Usage
-----

[](#usage)

The Workflow Package is working out of the Box in your Laravel application. Just go to the route /workflows to get started.

### Workflows

[](#workflows)

A Workflow is gets started by a Trigger and then executes the Tasks in the Order you set them. To pass information between the Tasks we have the DataBus.

### Triggers

[](#triggers)

A Trigger is the Starting Point and defines how a Workflow gets called. More Triggers coming soon.

#### ObserverTrigger

[](#observertrigger)

The Observer Trigger can listen to Eloquent Model Events and will then pass the Model which triggered the Event to the Workflow.

To make it Work add the WorkflowObservable to your Eloquent Model.

```
 use WorkflowObservable;
```

#### ButtonTrigger

[](#buttontrigger)

The Button Trigger is able to render a button in your "frontend" and Execute a Workflow based by a click on it. ButtonTrigger also accept an Model which they pass to the Workflow.

You can influence the buttons by adding your own classes or styles directly to each ButtonTrigger. Also you can publish the blade and change it according to your needs.

You have multiple ways of rendering ButtonTrigger.

##### ByName

[](#byname)

```
 {!! the42coders\Workflows\Triggers\ButtonTrigger::renderButtonByName('name', $model) !!}
```

##### ByWorkflowId

[](#byworkflowid)

```
 {!! the42coders\Workflows\Triggers\ButtonTrigger::renderButtonByWorkflowId(workflow_id, $model) !!}
```

##### ByCategory

[](#bycategory)

This will return all Triggers from the Category.

```
 {!! the42coders\Workflows\Triggers\ButtonTrigger::renderButtonsByCategory('categoryName', $model) !!}
```

### Tasks

[](#tasks)

A Task is a single code execution Node in the Workflow.

TaskDescriptionChangeModelChanges an Eloquent Model (Its not saving the changes to the DB)DomPDFThe DomPDF Task offers you a way to generate a PDF from HTML and put it to the DataBus (Works great with the HtmlInput Task).ExecuteThe Execute Task offers you to execute Shell Commands and is able to push the output of them to the DataBus.HtmlInputThe HtmlInput Task offers you a Trix Input Field which is able to render Blade. You can put in placeholders for dynamic content in two Ways. From the Model passed through the Workflow or from the DataBus.HttpStatusThe HttpStatus offers you a way to receive the Http Status of a given URL.PregReplaceThe PregReplace Task offers you a way to to a preg replace on a Value from the Model or a DataBus Variable.LoadModelLoads an Eloquent Model from the DB. You can provide the Class and the id.SaveFileThe SaveFile Task allows you to save Data to a File. Works easily with your registered Storage defines.SaveModelSaves an Eloquent Model.SendMailThe SendMail Task allows you to send a Mail. You can pass the Content and Attachments to it. (Works great with HtmlInput and DomPDF)SendSlackMessageThis Task let you send a Slack Message. Please read the Section about Slack Notifications to make your app ready too use this.#### SendSlackMessage

[](#sendslackmessage)

To send Slack messages you need to follow this 3 points.

1. You need to install Slack notifications [Laravel Slack Documentation](https://laravel.com/docs/8.x/notifications#slack-notifications)
2. You need to set up an incoming Slack Webhook [Slack Documentation](https://api.slack.com/messaging/webhooks)
3. Set the WebhookUrl to your env file with WORKFLOW\_SLACK\_CHANNEL=YourSlackWebhookUrl

### DataBus

[](#databus)

The DataBus is a way to pass information between the single Tasks. This keeps the Tasks independent of each other.

ResourceDescriptionValueResourceThe Value Resource is the simplest Resource. You can just write your Data in an input field.ConfigResourceThe Config Resource lets you access values from your Config Files.ModelResourceThe ModelResource lets you access the Data from the passed Eloquent Model.DataBusResourceThe DataBusResource lets you access the Data from the DataBus. This means all values which got set by a previous Task are access able here.### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Max Hutschenreiter](https://github.com/42coders)
- [All Contributors](../../contributors)
- jerosoler for [Drawflow](https://github.com/jerosoler/Drawflow)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.2% 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

Every ~62 days

Recently: every ~105 days

Total

19

Last Release

938d ago

PHP version history (3 changes)v0.0.1-betaPHP ^7.2

0.0.6-betaPHP ^7.2|^8.0

0.0.15PHP &gt;7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24477550?v=4)[42coders](/maintainers/42coders)[@42coders](https://github.com/42coders)

---

Top Contributors

[![Max-Hutschenreiter](https://avatars.githubusercontent.com/u/8393676?v=4)](https://github.com/Max-Hutschenreiter "Max-Hutschenreiter (111 commits)")[![daniel-werner](https://avatars.githubusercontent.com/u/38726367?v=4)](https://github.com/daniel-werner "daniel-werner (4 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")[![maki10](https://avatars.githubusercontent.com/u/13304146?v=4)](https://github.com/maki10 "maki10 (2 commits)")[![inmanturbo](https://avatars.githubusercontent.com/u/47095624?v=4)](https://github.com/inmanturbo "inmanturbo (1 commits)")[![danijelbjegovic](https://avatars.githubusercontent.com/u/38542995?v=4)](https://github.com/danijelbjegovic "danijelbjegovic (1 commits)")[![andresnijder](https://avatars.githubusercontent.com/u/736546?v=4)](https://github.com/andresnijder "andresnijder (1 commits)")

---

Tags

automatisationhacktoberfestlaravelphpworkflowsworkflows42coders

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/the42coders-workflows/health.svg)

```
[![Health](https://phpackages.com/badges/the42coders-workflows/health.svg)](https://phpackages.com/packages/the42coders-workflows)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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