Skip to content

Commit f6f0cc3

Browse files
authored
Allow passing a closure for users.
1 parent 460bc5f commit f6f0cc3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/FilamentDeveloperLoginsPlugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FilamentDeveloperLoginsPlugin implements Plugin
2323
/**
2424
* @var array<string, string>
2525
*/
26-
public array $users = [];
26+
public CLosure | array $users = [];
2727

2828
public Closure | string | null $redirectTo = null;
2929

@@ -105,11 +105,11 @@ public function getSwitchable(): bool
105105
}
106106

107107
/**
108-
* @param array<string, string> $users
108+
* @param CLosure | array<string, string> $users
109109
*
110110
* @return $this
111111
*/
112-
public function users(array $users): static
112+
public function users(Closure | array $users): static
113113
{
114114
$this->users = $users;
115115

@@ -121,7 +121,7 @@ public function users(array $users): static
121121
*/
122122
public function getUsers(): array
123123
{
124-
return $this->users;
124+
return $this->evaluate($this->users);
125125
}
126126

127127
public function redirectTo(Closure | string $redirectTo): static

0 commit comments

Comments
 (0)