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

Revision

Revision 118 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 118 Revision 140
Zeile 25... Zeile 25...
25
         * @var array<int, string>
25
         * @var array<int, string>
26
         */
26
         */
27
        protected $fillable = [
27
        protected $fillable = [
28
            'name',
28
            'name',
29
            'email',
29
            'email',
30
	    'password',
30
            'password',
31
	    'google2fa_secret',
31
            'google2fa_secret',
32
        ];
32
        ];
Zeile 33... Zeile 33...
33
 
33
 
34
        /**
34
        /**
35
         * The attributes that should be hidden for serialization.
35
         * The attributes that should be hidden for serialization.
Zeile 47... Zeile 47...
47
         * @var array<string, string>
47
         * @var array<string, string>
48
         */
48
         */
49
        protected $casts = [
49
        protected $casts = [
50
            'email_verified_at' => 'datetime',
50
            'email_verified_at' => 'datetime',
51
        ];
51
        ];
-
 
52
 
52
    /** 
53
        /**
53
     * Interact with the user's first name.
54
         * Interact with the user's first name.
54
     *
55
         *
55
     * @param  string  $value
56
         * @param string $value
56
     * @return \Illuminate\Database\Eloquent\Casts\Attribute
57
         * @return \Illuminate\Database\Eloquent\Casts\Attribute
57
     */
58
         */
58
    protected function google2faSecret(): Attribute
59
        protected function google2faSecret(): Attribute
59
    {
60
        {
60
        return new Attribute(
61
            return new Attribute(
61
            get: fn ($value) =>  decrypt($value),
62
                get: fn( $value ) => decrypt( $value ),
62
            set: fn ($value) =>  encrypt($value),
63
                set: fn( $value ) => encrypt( $value ),
63
        );
64
            );
64
    }    }
65
        }
-
 
66
    }