File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,24 @@ This is the contents of the published config file:
2929
3030``` php
3131return [
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
You can’t perform that action at this time.
0 commit comments