]> git.localhorst.tv Git - alttp.git/blob - app/Models/User.php
add discord auth
[alttp.git] / app / Models / User.php
1 <?php
2
3 namespace App\Models;
4
5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Foundation\Auth\User as Authenticatable;
7 use Illuminate\Notifications\Notifiable;
8 use Laravel\Sanctum\HasApiTokens;
9
10
11 class User extends Authenticatable
12 {
13     use HasApiTokens, HasFactory, Notifiable;
14
15     /**
16      * The attributes that are mass assignable.
17      *
18      * @var string[]
19      */
20     protected $fillable = [
21         'id',
22         'username',
23         'discriminator',
24         'email',
25         'avatar',
26         'verified',
27         'locale',
28         'mfa_enabled',
29         'refresh_token'
30     ];
31
32     /**
33      * The attributes that should be hidden for serialization.
34      *
35      * @var array
36      */
37     protected $hidden = [
38         'refresh_token',
39         'remember_token',
40     ];
41
42     /**
43      * The attributes that should be cast.
44      *
45      * @var array
46      */
47     protected $casts = [
48         'id' => 'string',
49         'username' => 'string',
50         'discriminator' => 'string',
51         'email' => 'string',
52         'avatar' => 'string',
53         'verified' => 'boolean',
54         'locale' => 'string',
55         'mfa_enabled' => 'boolean',
56         'refresh_token' => 'encrypted',
57     ];
58 }