File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace DutchCodingCompany \FilamentDeveloperLogins ;
4
4
5
- use App \Models \User ;
6
5
use Closure ;
7
6
use DutchCodingCompany \FilamentDeveloperLogins \Exceptions \ImplementationException ;
8
7
use Filament \Contracts \Plugin ;
@@ -16,6 +15,11 @@ class FilamentDeveloperLoginsPlugin implements Plugin
16
15
{
17
16
use EvaluatesClosures, HasColumns;
18
17
18
+ /**
19
+ * @var class-string<\Illuminate\Database\Eloquent\Model&\Illuminate\Contracts\Auth\Authenticatable>
20
+ */
21
+ public string $ modelClass = '' ;
22
+
19
23
public Closure | bool $ enabled = false ;
20
24
21
25
public Closure | bool $ switchable = true ;
@@ -31,10 +35,10 @@ class FilamentDeveloperLoginsPlugin implements Plugin
31
35
32
36
public string $ column = 'email ' ;
33
37
34
- /**
35
- * @var class-string<\Illuminate\Database\Eloquent\Model&\Illuminate\Contracts\Auth\Authenticatable>
36
- */
37
- public string $ modelClass = User::class;
38
+ public function __construct ()
39
+ {
40
+ $ this -> modelClass = config ( ' auth.providers.users.model ' ) ?? \ App \ Models \User::class;
41
+ }
38
42
39
43
public function getId (): string
40
44
{
You can’t perform that action at this time.
0 commit comments