@@ 80-86 (lines=7) @@ | ||
77 | $roles = [$roles]; |
|
78 | } |
|
79 | ||
80 | $roles = array_map(function ($role) { |
|
81 | if ($role instanceof Role) { |
|
82 | return $role; |
|
83 | } |
|
84 | ||
85 | return app(Role::class)->findByName($role, $this->getDefaultGuardName()); |
|
86 | }, $roles); |
|
87 | ||
88 | return $query->whereHas('roles', function ($query) use ($roles) { |
|
89 | $query->where(function ($query) use ($roles) { |
|
@@ 389-396 (lines=8) @@ | ||
386 | return $this->roles->pluck('name'); |
|
387 | } |
|
388 | ||
389 | protected function getStoredRole($role): Role |
|
390 | { |
|
391 | if (is_string($role)) { |
|
392 | return app(Role::class)->findByName($role, $this->getDefaultGuardName()); |
|
393 | } |
|
394 | ||
395 | return $role; |
|
396 | } |
|
397 | ||
398 | protected function convertPipeToArray(string $pipeString) |
|
399 | { |