diff --git a/composer.json b/composer.json index 27fe106..50f4099 100755 --- a/composer.json +++ b/composer.json @@ -21,7 +21,9 @@ "license": "Apache-2.0", "require": { "php": ">=7.1.0", - "laravel/framework": "~5.5|~6.0|~7.0|~8.0", + "illuminate/support": "~5.5|~6.0|~7.0|~8.0", + "illuminate/database": "~5.5|~6.0|~7.0|~8.0", + "illuminate/console": "~5.5|~6.0|~7.0|~8.0", "casbin/casbin": "~3.1", "casbin/psr3-bridge": "^1.1" }, diff --git a/config/lauthz.php b/config/lauthz.php index 81e5982..0cb16f8 100644 --- a/config/lauthz.php +++ b/config/lauthz.php @@ -14,7 +14,7 @@ return [ // Available Settings: "file", "text" 'config_type' => 'file', - 'config_file_path' => config_path('lauthz-rbac-model.conf'), + 'config_file_path' => __DIR__ . DIRECTORY_SEPARATOR . 'lauthz-rbac-model.conf', 'config_text' => '', ], diff --git a/src/LauthzServiceProvider.php b/src/LauthzServiceProvider.php index ab69c1e..56d1375 100644 --- a/src/LauthzServiceProvider.php +++ b/src/LauthzServiceProvider.php @@ -15,8 +15,10 @@ class LauthzServiceProvider extends ServiceProvider { if ($this->app->runningInConsole()) { $this->publishes([__DIR__ . '/../database/migrations' => database_path('migrations')], 'laravel-lauthz-migrations'); - $this->publishes([__DIR__ . '/../config/lauthz-rbac-model.conf' => config_path('lauthz-rbac-model.conf')], 'laravel-lauthz-config'); - $this->publishes([__DIR__ . '/../config/lauthz.php' => config_path('lauthz.php')], 'laravel-lauthz-config'); + $this->publishes([ + __DIR__ . '/../config/lauthz-rbac-model.conf' => $this->app->basePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . ('lauthz-rbac-model.conf'), + __DIR__ . '/../config/lauthz.php' => $this->app->basePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . ('lauthz.php'), + ], 'laravel-lauthz-config'); $this->commands([ Commands\GroupAdd::class,