Skip to content

Commit

Permalink
Merge pull request #277 from Laravel-Backpack/revert-avoid-publishing…
Browse files Browse the repository at this point in the history
…-files

Revert loading migrations instead of publishing
  • Loading branch information
tabacitu authored May 10, 2021
2 parents 6f6ba56 + 040fe27 commit 4c40b83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvid
// then, add the Spatie\Permission\Traits\HasRoles trait to your User model(s)
```

3) Publish `backpack\permissionmanager` config file:
3) Publish `backpack\permissionmanager` config file & the migrations:
```bash
php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider" --tag="config"
php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider" --tag="config" --tag="migrations"
```
> Note: _We recommend you to publish only the config file, but you may also publish lang and routes._
> Note: _We recommend you to publish only the config file and migrations, but you may also publish lang and routes._
4) Run the migrations:
```bash
Expand Down
4 changes: 2 additions & 2 deletions src/PermissionManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function boot()
// publish route file
$this->publishes([__DIR__.$this->routeFilePath => base_path($this->routeFilePath)], 'routes');

// load migration from Backpack 4.0 to Backpack 4.1
$this->loadMigrationsFrom(__DIR__.'/database/migrations');
// publish migration from Backpack 4.0 to Backpack 4.1
$this->publishes([__DIR__.'/database/migrations' => database_path('migrations')], 'migrations');
}

/**
Expand Down

0 comments on commit 4c40b83

Please sign in to comment.