d1f8bd40
Alexey Boroda
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
namespace thread\modules\user\models\query;
use thread\app\base\models\query\ActiveQuery;
/**
* Class GroupQuery
*
* @package thread\modules\user\models\query
* @author FilamentV <vortex.filament@gmail.com>
* @copyright (c), Thread
*/
class GroupQuery extends ActiveQuery
{
/**
* @param string $role
* @return $this
*/
public function role(string $role)
{
$modelClass = $this->modelClass;
$this->andWhere($modelClass::tableName() . '.role = :role', [':role' => $role]);
return $this;
}
}
|