diff --git a/app/Providers/ServicesServiceProvider.php b/app/Providers/ServicesServiceProvider.php index 0bae208..a46811a 100644 --- a/app/Providers/ServicesServiceProvider.php +++ b/app/Providers/ServicesServiceProvider.php @@ -1,23 +1,25 @@ <?php namespace Nasqueron\Notifications\Providers; use Illuminate\Support\ServiceProvider; use Nasqueron\Notifications\Services\Services; class ServicesServiceProvider extends ServiceProvider { /** * Registers the application services. * * @return void - * - * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ public function register() { $this->app->singleton('services', function ($app) { $path = config('services.gate.credentials'); - return Services::loadFromJson($path); + if ($app->make('filesystem')->has($path)) { + return Services::loadFromJson($path); + } + + return new Services; }); } }