From 39abad18cb3d63d814f36c1f4878d05ef2c66f12 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Sun, 13 Nov 2016 00:45:14 +0100 Subject: [PATCH] Publish migration file - issue #59 --- src/Mpociot/Teamwork/TeamworkServiceProvider.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Mpociot/Teamwork/TeamworkServiceProvider.php b/src/Mpociot/Teamwork/TeamworkServiceProvider.php index de9fcae..2bf8f60 100644 --- a/src/Mpociot/Teamwork/TeamworkServiceProvider.php +++ b/src/Mpociot/Teamwork/TeamworkServiceProvider.php @@ -46,7 +46,13 @@ protected function publishConfig() */ protected function publishMigration() { - $this->loadMigrationsFrom(__DIR__.'/../../database'); + if (! class_exists('TeamworkSetupTables')) { + // Publish the migration + $timestamp = date('Y_m_d_His', time()); + $this->publishes([ + __DIR__.'/../../database/migrations/2016_05_18_000000_teamwork_setup_tables.php' => database_path('migrations/'.$timestamp.'_teamwork_setup_tables.php'), + ], 'migrations'); + } } /**