Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ composer require kodeine/laravel-acl "^1.0"
],
```

3. Publish the package configuartion files and add your own models to the list of ACL models"
3. Publish the package configuartion files, migrations and add your own models to the list of ACL models"

```
$ php artisan vendor:publish --provider="Kodeine\Acl\AclServiceProvider"
Expand Down
26 changes: 14 additions & 12 deletions src/Kodeine/Acl/AclServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,20 @@ class AclServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishConfig();
$this->loadMigrationsFrom(__DIR__ . '/../../migrations');
$this->publishes(
[
__DIR__ . '/../../config/acl.php' => config_path('acl.php')
],
'config'
);

$this->publishes(
[
__DIR__ . '/../../migrations/' => base_path('/database/migrations')
],
'migrations'
);

$this->registerBladeDirectives();
}

Expand All @@ -38,16 +50,6 @@ public function register()
);
}

/**
* Publish the config file to the application config directory
*/
public function publishConfig()
{
$this->publishes([
__DIR__ . '/../../config/acl.php' => config_path('acl.php'),
], 'config');
}

public function registerBladeDirectives()
{
// role
Expand Down