where('uid', $value); } /** * division_id * @param $query * @param $value */ public function searchDivisionIdAttr($query, $value) { if ((int)$value !== 0) $query->where('division_id', $value); } /** * division_invite * @param $query * @param $value */ public function searchDivisionInviteAttr($query, $value) { if ($value != '') $query->where('division_invite', $value); } /** * status * @param $query * @param $value */ public function searchStatusAttr($query, $value) { if ($value !== '' && $value !== 'all') $query->where('status', $value); } /** * @param $query * @param $value */ public function searchKeywordAttr($query, $value) { if ($value !== '') $query->where('uid|agent_name', 'like', '%' . $value . '%'); } /** * is_del * @param $query * @param $value */ public function searchIsDelAttr($query, $value) { if ($value !== '') $query->where('is_del', $value); } }