library with grid

This commit is contained in:
Benjamin Takats
2023-01-20 16:07:30 +01:00
parent 109f2ef4ca
commit a1b15596df

View File

@@ -51,6 +51,8 @@ class LibraryTable extends Component
'lecturer',
'tags',
])
->when($this->currentTab !== '*', fn($query) => $query->whereHas('libraries',
fn($query) => $query->where('libraries.name', $this->currentTab)))
->when(count($this->filters) > 0, fn($query) => $query->whereHas('tags',
fn($query) => $query->whereIn('tags.id', $this->filters)))
->whereHas('libraries',