app/Http/Livewire/Datatable.php: in render() apply onlyTrashed() to query if $this->trashed is set.
This commit is contained in:
parent
34fb4034bb
commit
b4c46d447b
1 changed files with 5 additions and 0 deletions
|
|
@ -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 => $_) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue