feat: compatible with lumen (#39)

This commit is contained in:
Jon 2022-01-28 12:33:04 +08:00 committed by GitHub
parent 4872e8f905
commit a25afdb4a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -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"
},

View File

@ -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' => '',
],

View File

@ -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,