User.php 915 Bytes
Newer Older
1
2
3
4
5
<?php

namespace App;

use Illuminate\Notifications\Notifiable;
Jacob Priddy's avatar
Jacob Priddy committed
6
use Illuminate\Database\Eloquent\Relations\HasMany;
Jacob Priddy's avatar
Jacob Priddy committed
7
use Illuminate\Foundation\Auth\User as Authenticatable;
8

Jacob Priddy's avatar
Jacob Priddy committed
9
class User extends Authenticatable {
10
11
12
13
14
15
16
17
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
Jacob Priddy's avatar
Jacob Priddy committed
18
19
20
        'name',
        'email',
        'password',
21
22
23
24
25
26
27
28
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
Jacob Priddy's avatar
Jacob Priddy committed
29
30
31
        'password',
        'remember_token',
        'api_token',
32
33
34
35
36
37
38
39
40
41
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
Jacob Priddy's avatar
Jacob Priddy committed
42
43
44
45
46
47
48

    /**
     * @return HasMany
     */
    public function tokens(): HasMany {
        return $this->hasMany(Token::class);
    }
49
}