mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
- AppServiceProvider is needs more work to wire in new services - todo: more dtos - todo: add unit tests - todo: add more integration tests
20 lines
432 B
PHP
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);
|
|
}
|
|
}
|