1 | <?php |
||
7 | class User extends Model |
||
8 | { |
||
9 | /** |
||
10 | * The attributes that are mass assignable. |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $fillable = [ |
||
15 | 'name', 'email', 'password', |
||
16 | ]; |
||
17 | |||
18 | /** |
||
19 | * The attributes that should be hidden for arrays. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $hidden = [ |
||
24 | 'password', 'remember_token', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * The attributes that should be cast to native types. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $casts = [ |
||
33 | 'email_verified_at' => 'datetime', |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * User identifier field. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $username = 'email'; |
||
42 | |||
43 | /** |
||
44 | * Get user identifier field. |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | public function getUserIndentifier() |
||
52 | } |
||
53 |