mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
search
This commit is contained in:
@@ -78,6 +78,15 @@ class LibraryTable extends Component
|
||||
->orWhereHas('libraries',
|
||||
fn($query) => $query
|
||||
->where('libraries.parent_id', $parentLibrary->id)
|
||||
->when($term, fn($query) => $query
|
||||
->where('name', 'ilike', '%'.$term.'%')
|
||||
->orWhere(fn($query) => $query
|
||||
->when(count($searchTags) > 0 && count($this->filters) < 1,
|
||||
fn($query) => $query->whereHas('tags',
|
||||
fn($query) => $query->whereIn('tags.id',
|
||||
$searchTags)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
->when(count($this->filters) > 0, fn($query) => $query->whereHas('tags',
|
||||
|
||||
Reference in New Issue
Block a user