Subversion-Projekte lars-tiefland.webanos.faltradxxs.de

Revision

Revision 2 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2 Revision 118
Zeile 5... Zeile 5...
5
    // use Illuminate\Contracts\Auth\MustVerifyEmail;
5
    // use Illuminate\Contracts\Auth\MustVerifyEmail;
6
    use Illuminate\Database\Eloquent\Factories\HasFactory;
6
    use Illuminate\Database\Eloquent\Factories\HasFactory;
7
    use Illuminate\Foundation\Auth\User as Authenticatable;
7
    use Illuminate\Foundation\Auth\User as Authenticatable;
8
    use Illuminate\Notifications\Notifiable;
8
    use Illuminate\Notifications\Notifiable;
9
    use Laravel\Sanctum\HasApiTokens;
9
    use Laravel\Sanctum\HasApiTokens;
-
 
10
    use Illuminate\Database\Eloquent\Casts\Attribute;
Zeile 10... Zeile 11...
10
 
11
 
11
    class User extends Authenticatable
12
    class User extends Authenticatable
12
    {
13
    {
Zeile 24... Zeile 25...
24
         * @var array<int, string>
25
         * @var array<int, string>
25
         */
26
         */
26
        protected $fillable = [
27
        protected $fillable = [
27
            'name',
28
            'name',
28
            'email',
29
            'email',
29
            'password',
30
	    'password',
-
 
31
	    'google2fa_secret',
30
        ];
32
        ];
Zeile 31... Zeile 33...
31
 
33
 
32
        /**
34
        /**
33
         * The attributes that should be hidden for serialization.
35
         * The attributes that should be hidden for serialization.
Zeile 45... Zeile 47...
45
         * @var array<string, string>
47
         * @var array<string, string>
46
         */
48
         */
47
        protected $casts = [
49
        protected $casts = [
48
            'email_verified_at' => 'datetime',
50
            'email_verified_at' => 'datetime',
49
        ];
51
        ];
-
 
52
    /** 
-
 
53
     * Interact with the user's first name.
-
 
54
     *
-
 
55
     * @param  string  $value
-
 
56
     * @return \Illuminate\Database\Eloquent\Casts\Attribute
-
 
57
     */
-
 
58
    protected function google2faSecret(): Attribute
50
    }
59
    {
-
 
60
        return new Attribute(
-
 
61
            get: fn ($value) =>  decrypt($value),
-
 
62
            set: fn ($value) =>  encrypt($value),
-
 
63
        );
-
 
64
    }    }