Skip to content

Commit

Permalink
Fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jun 8, 2017
1 parent bb0580e commit 7c10d79
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/FollowServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ public function boot()
{
$root = dirname(__DIR__);

$this->publishes([
$root.'/config/follow.php' => config_path('follow.php'),
], 'config');


$datePrefix = date('Y_m_d_His');
$this->publishes([
$root.'/database/migrations/create_laravel_follow_tables.php'
=> database_path("/migrations/{$datePrefix}_create_laravel_follow_tables.php"),
], 'migrations');
if (!file_exists(config_path('follow.php'))) {
$this->publishes([
$root.'/config/follow.php' => config_path('follow.php'),
], 'config');
}

if (!class_exists('CreateLaravelFollowTables')) {
$datePrefix = date('Y_m_d_His');
$this->publishes([
$root.'/database/migrations/create_laravel_follow_tables.php'
=> database_path("/migrations/{$datePrefix}_create_laravel_follow_tables.php"),
], 'migrations');
}
}

/**
Expand Down

0 comments on commit 7c10d79

Please sign in to comment.