first commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class GameServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// Register game services as singletons
|
||||
$this->app->singleton(\App\Services\Game\EnergyService::class, function ($app) {
|
||||
return new \App\Services\Game\EnergyService();
|
||||
});
|
||||
|
||||
$this->app->singleton(\App\Services\Game\HealthService::class, function ($app) {
|
||||
return new \App\Services\Game\HealthService();
|
||||
});
|
||||
|
||||
$this->app->singleton(\App\Services\Game\EconomyService::class, function ($app) {
|
||||
return new \App\Services\Game\EconomyService();
|
||||
});
|
||||
|
||||
$this->app->singleton(\App\Services\Game\CrimeService::class, function ($app) {
|
||||
return new \App\Services\Game\CrimeService();
|
||||
});
|
||||
|
||||
$this->app->singleton(\App\Services\Game\NotificationService::class, function ($app) {
|
||||
return new \App\Services\Game\NotificationService();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Boot logic if needed
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user