Skip to content

Commit 02bbee9

Browse files
committed
Modified migration
1 parent 7db8203 commit 02bbee9

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ And then include the service provider within `app/config/app.php`. Note: If you
2626

2727
At last you need to publish and run the migration.
2828
```
29-
php artisan vendor:publish --provider="Codebyray\ReviewRateable\ReviewRateableServiceProvider"
29+
php artisan vendor:publish --provider="Codebyray\ReviewRateable\ReviewRateableServiceProvider" --tag="migrations"
3030
```
3131

3232
Run the migration

src/ReviewRateableServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ class ReviewRateableServiceProvider extends ServiceProvider
1313
*/
1414
public function boot()
1515
{
16+
$timestamp = date('Y_m_d_His', time());
1617
$this->publishes([
17-
__DIR__.'/../database/migrations/' => database_path('migrations')
18+
__DIR__.'/../database/migrations/create_reviews_table.php.stub' => $this->app->databasePath()."/migrations/{$timestamp}create_reviews_table.php",
1819
], 'migrations');
1920
}
2021

0 commit comments

Comments
 (0)