vito/app/Providers/AppServiceProvider.php
Saeed Vaziry a406491160
increase test coverage (#117)
70% test coverage
remove socialite
2024-03-15 22:23:45 +01:00

46 lines
1.0 KiB
PHP

<?php
namespace App\Providers;
use App\Helpers\Notifier;
use App\Helpers\SSH;
use App\Helpers\Toast;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* @throws BindingResolutionException
*/
public function boot(): void
{
ResourceCollection::withoutWrapping();
// facades
$this->app->bind('ssh', function () {
return new SSH;
});
$this->app->bind('notifier', function () {
return new Notifier;
});
$this->app->bind('toast', function () {
return new Toast;
});
if (str(config('app.url'))->startsWith('https://')) {
URL::forceScheme('https');
}
}
}