Skip to content

Commit

Permalink
Merge pull request #74 from mpociot/publish
Browse files Browse the repository at this point in the history
Enable migrations publishing
  • Loading branch information
nonoesp authored Dec 1, 2020
2 parents 69baf29 + 01b5111 commit f58498b
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 f58498b

Please sign in to comment.