2
2
3
3
namespace App \Models ;
4
4
5
+ // use Illuminate\Contracts\Auth\MustVerifyEmail;
6
+
7
+ use Filament \Models \Contracts \FilamentUser ;
8
+ use Filament \Panel ;
5
9
use Illuminate \Database \Eloquent \Factories \HasFactory ;
6
10
use Illuminate \Foundation \Auth \User as Authenticatable ;
7
11
use Illuminate \Notifications \Notifiable ;
8
12
use JoelButcher \Socialstream \HasConnectedAccounts ;
9
13
use Laravel \Sanctum \HasApiTokens ;
10
14
11
- class User extends Authenticatable
15
+ class User extends Authenticatable implements FilamentUser
12
16
{
13
- use HasApiTokens;
17
+ use HasApiTokens, HasFactory, Notifiable ;
14
18
use HasConnectedAccounts;
15
- use HasFactory;
16
- use Notifiable;
17
19
18
20
/**
19
21
* The attributes that are mass assignable.
@@ -27,23 +29,27 @@ class User extends Authenticatable
27
29
];
28
30
29
31
/**
30
- * The attributes that should be hidden for arrays .
32
+ * The attributes that should be hidden for serialization .
31
33
*
32
34
* @var array<int, string>
33
35
*/
34
36
protected $ hidden = [
35
37
'password ' ,
36
38
'remember_token ' ,
37
- 'two_factor_recovery_codes ' ,
38
- 'two_factor_secret ' ,
39
39
];
40
40
41
41
/**
42
- * The attributes that should be cast to native types .
42
+ * The attributes that should be cast.
43
43
*
44
44
* @var array<string, string>
45
45
*/
46
46
protected $ casts = [
47
47
'email_verified_at ' => 'datetime ' ,
48
+ 'password ' => 'hashed ' ,
48
49
];
50
+
51
+ public function canAccessPanel (Panel $ panel ): bool
52
+ {
53
+ return true ;
54
+ }
49
55
}
0 commit comments