Skip to content

Commit 4ce908b

Browse files
committed
Uses file_exists for checking of components exists
1 parent 47d58f3 commit 4ce908b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Components/Database/Provider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Provider extends AbstractComponentProvider
5252
public function isAvailable(): bool
5353
{
5454
return class_exists(DatabaseServiceProvider::class)
55-
&& is_array($this->app['config']->get('database', false))
55+
&& file_exists($this->app->configPath('database.php'))
5656
&& $this->app['config']->get('database.useDefaultProvider', true) === true;
5757
}
5858

src/Components/Log/Provider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class Provider extends AbstractComponentProvider
2828
*/
2929
public function isAvailable(): bool
3030
{
31-
return class_exists(\Illuminate\Log\LogServiceProvider::class)
31+
return file_exists($this->app->configPath('logging.php'))
3232
&& $this->app['config']->get('logging.useDefaultProvider', true) === true;
3333
}
3434

0 commit comments

Comments
 (0)