Skip to content

Commit 67ff24c

Browse files
Merge pull request #341 from samuelterra22/patch-1
Update migration file publishing with timestamp
2 parents 6f566d4 + b8aee89 commit 67ff24c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/LaravelSettingsServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ public function boot()
2727
], 'config');
2828

2929
if (! class_exists('CreateSettingsTable')) {
30+
$timestamp = date('Y_m_d_His');
31+
$destination = database_path("migrations/{$timestamp}_create_settings_table.php");
32+
3033
$this->publishes([
31-
__DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path('migrations/2022_12_14_083707_create_settings_table.php'),
34+
__DIR__ . '/../database/migrations/create_settings_table.php.stub' => $destination,
3235
], 'migrations');
3336
}
3437

38+
3539
$this->commands([
3640
MakeSettingCommand::class,
3741
MakeSettingsMigrationCommand::class,

0 commit comments

Comments
 (0)