Skip to content

Commit 8030207

Browse files
committed
fix: missing first()
1 parent d4c65cd commit 8030207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RoleBooleanGroup.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct($name, $attribute = null, callable $resolveCallback
2828

2929
$options = $roleClass::get()
3030
->pluck($labelAttribute ?? 'name', 'name')
31-
->filter(fn($role) => Auth::user()->can('view', RoleModel::where('name', $role)))
31+
->filter(fn($role) => Auth::user()->can('view', RoleModel::where('name', $role)->first()))
3232
->toArray();
3333

3434
$this->options($options);

0 commit comments

Comments
 (0)