Skip to content

Commit

Permalink
New feature for the issue yiisoft#551
Browse files Browse the repository at this point in the history
  • Loading branch information
evil1 committed Dec 25, 2024
1 parent c025c29 commit 79d398f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generators/crud/default/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function scenarios()
*
* @return ActiveDataProvider
*/
public function search($params)
public function search($params, $formName = '<?= $searchModelClass ?>')
{
$query = <?= isset($modelAlias) ? $modelAlias : $modelClass ?>::find();

Expand All @@ -70,7 +70,7 @@ public function search($params)
'query' => $query,
]);

$this->load($params);
$this->load($params, $formName);

if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
Expand Down

0 comments on commit 79d398f

Please sign in to comment.