Skip to content

Commit 4c40b83

Browse files
authored
Merge pull request #277 from Laravel-Backpack/revert-avoid-publishing-files
Revert loading migrations instead of publishing
2 parents 6f6ba56 + 040fe27 commit 4c40b83

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvid
4242
// then, add the Spatie\Permission\Traits\HasRoles trait to your User model(s)
4343
```
4444

45-
3) Publish `backpack\permissionmanager` config file:
45+
3) Publish `backpack\permissionmanager` config file & the migrations:
4646
```bash
47-
php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider" --tag="config"
47+
php artisan vendor:publish --provider="Backpack\PermissionManager\PermissionManagerServiceProvider" --tag="config" --tag="migrations"
4848
```
49-
> Note: _We recommend you to publish only the config file, but you may also publish lang and routes._
49+
> Note: _We recommend you to publish only the config file and migrations, but you may also publish lang and routes._
5050
5151
4) Run the migrations:
5252
```bash

src/PermissionManagerServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function boot()
4747
// publish route file
4848
$this->publishes([__DIR__.$this->routeFilePath => base_path($this->routeFilePath)], 'routes');
4949

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

5454
/**

0 commit comments

Comments
 (0)