1
0
Fork 0

app/Http/Livewire/Datatable.php: in render() apply onlyTrashed() to query if $this->trashed is set.

This commit is contained in:
Henrik Hautakoski 2022-01-23 12:51:25 +01:00
parent 34fb4034bb
commit b4c46d447b

View file

@ -92,6 +92,11 @@ class Datatable extends Component
{
$query = $this->model->query();
// Only include trashed if asked to.
if ($this->trashed) {
$query->onlyTrashed();
}
// Check colums for "dot-notated" strings.
// as we want to eager load those relationships
foreach ($this->columns as $col => $_) {