Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 13 | public function boot(): void |
|
11 | { |
||
12 | 13 | $configFile = __DIR__ . '/../config/comment.php'; |
|
13 | |||
14 | 13 | $this->publishes([ |
|
15 | 13 | $configFile => config_path('comment.php'), |
|
16 | 13 | ], 'config'); |
|
17 | |||
18 | 13 | $this->mergeConfigFrom($configFile, 'comment'); |
|
19 | |||
20 | 13 | if (!class_exists('CreateCommentsTable')) { |
|
21 | 1 | $timestamp = date('Y_m_d_His', time()); |
|
22 | |||
23 | 1 | $this->publishes([ |
|
24 | __DIR__ . '/../database/migrations/create_comments_table.php.stub' => |
||
25 | 1 | database_path("migrations/{$timestamp}_create_comments_table.php") |
|
26 | 1 | ], 'migrations'); |
|
27 | } |
||
30 |