Skip to content

Commit 6284311

Browse files
committed
Fix
1 parent 480fc2b commit 6284311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SearchableModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class SearchableModel extends BaseGridQuery
99
{
1010
protected $model;
1111

12-
public function __construct($model, $query, $searchableColumns = ['*'])
12+
public function __construct($model, $query = null, $searchableColumns = ['*'])
1313
{
1414
$this->model = $model;
15-
$this->query = $query;
15+
$this->query = $query ?: $model;
1616
$this->searchableColumns = $this->getSearchableColumns($model, $searchableColumns);
1717
}
1818

0 commit comments

Comments
 (0)