Artesaos\Defender\Repositories\Eloquent\EloquentPermissionRepository::getByRoles PHP Метод

getByRoles() публичный Метод

public getByRoles ( array $rolesIds ) : Illuminate\Database\Eloquent\Collection
$rolesIds array
Результат Illuminate\Database\Eloquent\Collection
    public function getByRoles(array $rolesIds)
    {
        return $this->model->whereHas('roles', function ($query) use($rolesIds) {
            $query->whereIn('id', $rolesIds);
        })->get();
    }