Skip to content

Commit 4335b45

Browse files
authored
Merge pull request #29 from squarezhou/develop
Support for lumen
2 parents 876938e + 21c56cc commit 4335b45

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/WorkflowServiceProvider.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public function boot()
2323
$configPath = $this->configPath();
2424

2525
$this->publishes([
26-
"${configPath}/workflow.php" => config_path('workflow.php'),
27-
"${configPath}/workflow_registry.php" => config_path('workflow_registry.php')
26+
"${configPath}/workflow.php" => $this->publishPath('workflow.php'),
27+
"${configPath}/workflow_registry.php" => $this->publishPath('workflow_registry.php')
2828
], 'config');
2929
}
3030

@@ -53,6 +53,15 @@ protected function configPath()
5353
{
5454
return __DIR__ . '/../config';
5555
}
56+
57+
protected function publishPath($configFile)
58+
{
59+
if (function_exists('config_path')) {
60+
return config_path($configFile);
61+
} else {
62+
return base_path('config/' . $configFile);
63+
}
64+
}
5665

5766
/**
5867
* Get the services provided by the provider.

0 commit comments

Comments
 (0)