@@ 61-67 (lines=7) @@ | ||
58 | $roles = [$roles]; |
|
59 | } |
|
60 | ||
61 | $roles = array_map(function ($role) { |
|
62 | if ($role instanceof Role) { |
|
63 | return $role; |
|
64 | } |
|
65 | ||
66 | return app(Role::class)->findByName($role, $this->getDefaultGuardName()); |
|
67 | }, $roles); |
|
68 | ||
69 | return $query->whereHas('roles', function ($query) use ($roles) { |
|
70 | $query->where(function ($query) use ($roles) { |
|
@@ 306-313 (lines=8) @@ | ||
303 | ->values(); |
|
304 | } |
|
305 | ||
306 | protected function getStoredRole($role): Role |
|
307 | { |
|
308 | if (is_string($role)) { |
|
309 | return app(Role::class)->findByName($role, $this->getDefaultGuardName()); |
|
310 | } |
|
311 | ||
312 | return $role; |
|
313 | } |
|
314 | ||
315 | protected function convertPipeToArray(string $pipeString) |
|
316 | { |