Skip to content

Commit a25afdb

Browse files
authored
feat: compatible with lumen (#39)
1 parent 4872e8f commit a25afdb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"license": "Apache-2.0",
2222
"require": {
2323
"php": ">=7.1.0",
24-
"laravel/framework": "~5.5|~6.0|~7.0|~8.0",
24+
"illuminate/support": "~5.5|~6.0|~7.0|~8.0",
25+
"illuminate/database": "~5.5|~6.0|~7.0|~8.0",
26+
"illuminate/console": "~5.5|~6.0|~7.0|~8.0",
2527
"casbin/casbin": "~3.1",
2628
"casbin/psr3-bridge": "^1.1"
2729
},

config/lauthz.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// Available Settings: "file", "text"
1515
'config_type' => 'file',
1616

17-
'config_file_path' => config_path('lauthz-rbac-model.conf'),
17+
'config_file_path' => __DIR__ . DIRECTORY_SEPARATOR . 'lauthz-rbac-model.conf',
1818

1919
'config_text' => '',
2020
],

src/LauthzServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ public function boot()
1515
{
1616
if ($this->app->runningInConsole()) {
1717
$this->publishes([__DIR__ . '/../database/migrations' => database_path('migrations')], 'laravel-lauthz-migrations');
18-
$this->publishes([__DIR__ . '/../config/lauthz-rbac-model.conf' => config_path('lauthz-rbac-model.conf')], 'laravel-lauthz-config');
19-
$this->publishes([__DIR__ . '/../config/lauthz.php' => config_path('lauthz.php')], 'laravel-lauthz-config');
18+
$this->publishes([
19+
__DIR__ . '/../config/lauthz-rbac-model.conf' => $this->app->basePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . ('lauthz-rbac-model.conf'),
20+
__DIR__ . '/../config/lauthz.php' => $this->app->basePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . ('lauthz.php'),
21+
], 'laravel-lauthz-config');
2022

2123
$this->commands([
2224
Commands\GroupAdd::class,

0 commit comments

Comments
 (0)