30 lines
542 B
PHP
30 lines
542 B
PHP
|
<?php
|
||
|
|
||
|
|
||
|
namespace backend\modules\balance\models;
|
||
|
|
||
|
|
||
|
use common\classes\Debug;
|
||
|
use yii\base\Model;
|
||
|
use yii\data\ActiveDataProvider;
|
||
|
|
||
|
class BalanceSearch extends Balance
|
||
|
{
|
||
|
public function scenarios()
|
||
|
{
|
||
|
return Model::scenarios(); // TODO: Change the autogenerated stub
|
||
|
}
|
||
|
|
||
|
public function search()
|
||
|
{
|
||
|
$query = Balance::find();
|
||
|
$dataProvider = new ActiveDataProvider([
|
||
|
'query' => $query,
|
||
|
]);
|
||
|
|
||
|
if($this->validate())
|
||
|
{
|
||
|
return $dataProvider;
|
||
|
}
|
||
|
}
|
||
|
}
|