taktik - laravel

This commit is contained in:
2025-01-23 00:19:07 +01:00
commit 43b6cff880
127 changed files with 15025 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use App\Services\Comment\PostCommentService;
use App\Services\QueryRequestModifiers\Comment\CommentFilter;
use App\Services\QueryRequestModifiers\Comment\CommentOrder;
use App\Services\QueryRequestModifiers\Comment\CommentOrderDTO;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
class CommentServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
$this->app->singleton(CommentFilter::class, function (Application $app) {
return new CommentFilter();
});
$this->app->singleton(CommentOrder::class, function (Application $app) {
return new CommentOrder();
});
$this->app->singleton(PostCommentService::class, function (Application $app) {
return new PostCommentService(
$this->app->get(CommentFilter::class),
$this->app->get(CommentOrder::class),
);
});
}
/**
* Bootstrap services.
*/
public function boot(): void
{
//
}
}