Skip to content

Commit ef46da8

Browse files
authored
Update README.md
1 parent 7c364d0 commit ef46da8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ This is the contents of the published config file:
2929

3030
```php
3131
return [
32+
'custom_functions' => [
33+
// 'function_name' => [
34+
// 'compiler' => function () { return 'true'; },
35+
// 'evaluator' => function (array $variables) { return true; },
36+
// ],
37+
// 'function_name' => 'App\CustomGuardFunction',
38+
// 'authenicated' => \Soap\LaravelWorkflowProcess\GuardFunctions\Authenticated::class,
39+
40+
'authenticated' => [
41+
'compiler' => function ($guard = 'web') {
42+
return sprintf('authenticated("%s")', $guard);
43+
},
44+
'evaluator' => function (array $variables, $guard = 'web') {
45+
// This allows checking a specific guard (e.g., 'web', 'api', etc.)
46+
return auth()->guard($guard)->check();
47+
},
48+
],
49+
],
3250
];
3351
```
3452

0 commit comments

Comments
 (0)