Skip to content

Commit 345c2ce

Browse files
Merge pull request #3 from rootinc/chore/publish-with-current-datetime
Update FileModelServiceProvider.php
2 parents 18de04d + d73f55c commit 345c2ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/FileModelServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class FileModelServiceProvider extends ServiceProvider
1313
*/
1414
public function boot()
1515
{
16+
$now_slug = date('Y_m_d_His');
17+
1618
if ($this->app->runningInConsole())
1719
{
1820
$this->publishes([
@@ -36,8 +38,8 @@ public function boot()
3638
], 'file-factory');
3739

3840
$this->publishes([
39-
__DIR__ . '/../templates/2020_03_12_152841_create_files_table.php' => database_path('migrations/2020_03_12_152841_create_files_table.php'),
41+
__DIR__ . '/../templates/2020_03_12_152841_create_files_table.php' => database_path("migrations/{$now_slug}_create_files_table.php"),
4042
], 'file-table');
4143
}
4244
}
43-
}
45+
}

0 commit comments

Comments
 (0)