first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ScheduleServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
$this->commands([
|
||||
\App\Console\Commands\Game\ProcessEnergyRegen::class,
|
||||
\App\Console\Commands\Game\ProcessHealthRegen::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user