You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-4Lines changed: 50 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
This package extends [zerodahero/laravel-workflow](https://github.com/zerodahero/laravel-workflow) by adding option to store workflow configuration in database. Laravel workflow only support loading configuration form Laravel configuration. This package provides user to change workflow configuration without helping from developers.
10
10
11
11
## Support us
12
-
12
+
You can suggest for any approvement, sponsor this project or make a pull request. I am happy to consider any recommendation. I am not a good programmer so my design may not be the best one. My background is not computer programming. I am an Electrical engineer.
13
13
14
14
## Installation
15
15
@@ -36,17 +36,63 @@ This is the contents of the published config file:
To use this package to load workflow configuration from database, you need to register workflow service provider provided by the package. Zerodahero 's workflow registry will be used to load configuration retreiving from database.
To use this package to store workflow configuration you need to register workflow binding in your application service provider. You have to instruct Laravel to use new 'workflow' binding instead of the one provided by zerodahero/laravel-workflow.
58
+
This will copy the following WorkflowServiceProvider.php to application providers folder, ensure that it was included in application bootstrap. The following is the content of the file.
46
59
47
60
```php
48
61
62
+
namespace App\Providers;
63
+
64
+
use Illuminate\Support\ServiceProvider;
65
+
66
+
class WorkflowServiceProvider extends ServiceProvider
foreach ($workflowLoaderRegistry->all() as $workflow => $config) {
75
+
$registry->addFromArray($workflow, $config);
76
+
}
77
+
}
78
+
}
79
+
```
80
+
This package doesnot provide user interface for user to manage workflow configuration. By design it should be in separate package. I have a plan to create filament plugin to handle this.
81
+
82
+
## Usage
83
+
After you have completed setup, create workflow configuration in database using your own way or provided by other package. Then use them like the one you use by zerohadero/laravel-workflow. Storing configuration in database is easy to develop workflow for user.
84
+
85
+
## To Do
86
+
Curently guards should be created via event subscriber. I have a plan to use Symfony expression as upper guard layer. For example, you can write;
0 commit comments