mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
fix: broken search
This commit is contained in:
parent
387b937820
commit
bd246c37dd
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ use Illuminate\Support\Collection;
|
||||||
abstract class Repository implements RepositoryInterface
|
abstract class Repository implements RepositoryInterface
|
||||||
{
|
{
|
||||||
/** @var class-string<T> $modelClass */
|
/** @var class-string<T> $modelClass */
|
||||||
protected string $modelClass;
|
public string $modelClass;
|
||||||
|
|
||||||
protected Guard $auth;
|
protected Guard $auth;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class SearchService
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $repository->getMany(
|
return $repository->getMany(
|
||||||
ids: $repository->model::search($keywords)->get()->take($count)->pluck('id')->all(), // @phpstan-ignore-line
|
ids: $repository->modelClass::search($keywords)->get()->take($count)->pluck('id')->all(), // @phpstan-ignore-line
|
||||||
preserveOrder: true,
|
preserveOrder: true,
|
||||||
);
|
);
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
|
|
Loading…
Reference in a new issue