Skip to content

Commit

Permalink
Uses file_exists for checking of components exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Apr 25, 2024
1 parent 47d58f3 commit 4ce908b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Components/Database/Provider.php
Expand Up @@ -52,7 +52,7 @@ class Provider extends AbstractComponentProvider
public function isAvailable(): bool
{
return class_exists(DatabaseServiceProvider::class)
&& is_array($this->app['config']->get('database', false))
&& file_exists($this->app->configPath('database.php'))
&& $this->app['config']->get('database.useDefaultProvider', true) === true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Log/Provider.php
Expand Up @@ -28,7 +28,7 @@ final class Provider extends AbstractComponentProvider
*/
public function isAvailable(): bool
{
return class_exists(\Illuminate\Log\LogServiceProvider::class)
return file_exists($this->app->configPath('logging.php'))
&& $this->app['config']->get('logging.useDefaultProvider', true) === true;
}

Expand Down

0 comments on commit 4ce908b

Please sign in to comment.