This commit is contained in:
Saeed Vaziry
2024-03-24 09:56:34 +01:00
committed by GitHub
parent 884f18db63
commit 4d051330d6
1055 changed files with 14493 additions and 20278 deletions

View File

@ -4,7 +4,7 @@
use App\Helpers\Notifier;
use App\Helpers\SSH;
use App\Support\SocialiteProviders\DropboxProvider;
use App\Helpers\Toast;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Facades\URL;
@ -34,27 +34,12 @@ public function boot(): void
$this->app->bind('notifier', function () {
return new Notifier;
});
$this->extendSocialite();
$this->app->bind('toast', function () {
return new Toast;
});
if (str(config('app.url'))->startsWith('https://')) {
URL::forceScheme('https');
}
}
/**
* @throws BindingResolutionException
*/
private function extendSocialite(): void
{
$socialite = $this->app->make('Laravel\Socialite\Contracts\Factory');
$socialite->extend(
'dropbox',
function ($app) use ($socialite) {
$config = $app['config']['services.dropbox'];
return $socialite->buildProvider(DropboxProvider::class, $config);
}
);
}
}