25 lines
717 B
PHP
25 lines
717 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\ApiService;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register()
|
|
{
|
|
$this->app->singleton(ApiService::class, function () {
|
|
return new ApiService();
|
|
});
|
|
$this->app->singleton(ApiService::class, fn () => new ApiService());
|
|
$this->app->singleton(NotificationApiService::class, fn () => new NotificationApiService());
|
|
$this->app->singleton(StationApiService::class, fn () => new StationApiService());
|
|
$this->app->singleton(CookieService::class, fn () => new CookieService());
|
|
}
|
|
|
|
public function boot()
|
|
{
|
|
// ...
|
|
}
|
|
} |