Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function canSolve(Throwable $throwable): bool |
||
15 | { |
||
16 | if ($this->canTryDatabaseConnection()) { |
||
17 | try { |
||
18 | DB::connection()->select('SELECT 1'); |
||
19 | } catch (\Exception $e) { |
||
20 | if ($this->isUnknownDatabaseCode($e->getCode())) { |
||
21 | return in_array(env('DB_DATABASE'), ['homestead', 'laravel']); |
||
22 | } |
||
23 | } |
||
24 | } |
||
25 | |||
26 | return false; |
||
27 | } |
||
28 | |||
44 |