jikan-rest/app/Services/DefaultScoutSearchService.php
pushrbx a145f18bbd wip - major refactor
- AppServiceProvider is needs more work to wire in new services
- todo: more dtos
- todo: add unit tests
- todo: add more integration tests
2023-05-21 11:14:34 +01:00

20 lines
432 B
PHP

<?php
namespace App\Services;
use App\Contracts\Repository;
class DefaultScoutSearchService implements ScoutSearchService
{
public function __construct(private readonly Repository $repository)
{
}
public function search(string $q, ?string $orderByField = null,
bool $sortDirectionDescending = false): \Laravel\Scout\Builder
{
return $this->repository->search($q);
}
}