We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 480fc2b commit 6284311Copy full SHA for 6284311
src/SearchableModel.php
@@ -9,10 +9,10 @@ class SearchableModel extends BaseGridQuery
9
{
10
protected $model;
11
12
- public function __construct($model, $query, $searchableColumns = ['*'])
+ public function __construct($model, $query = null, $searchableColumns = ['*'])
13
14
$this->model = $model;
15
- $this->query = $query;
+ $this->query = $query ?: $model;
16
$this->searchableColumns = $this->getSearchableColumns($model, $searchableColumns);
17
}
18
0 commit comments