Skip to content

Commit

Permalink
Enable migrations publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
nonoesp committed Dec 1, 2020
1 parent 69baf29 commit 01b5111
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ Run the migrations.
php artisan migrate --path=vendor/mpociot/versionable/src/migrations
```

Alternatively, publish the migrations.

```
php artisan vendor:publish --provider="Mpociot\Versionable\Providers\ServiceProvider" --tag="migrations"
```

Then customize and run them.

```
php artisan migrate
```

<a name="usage" />

## Usage
Expand Down
4 changes: 4 additions & 0 deletions src/Mpociot/Versionable/Providers/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public function boot()
__DIR__.'/../../../config/config.php' => config_path('versionable.php'),
], 'config');

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

// $this->loadMigrationsFrom(__DIR__.'/../../../migrations');
}
}

0 comments on commit 01b5111

Please sign in to comment.