We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
13 | class User extends Authenticatable |
||
14 | { |
||
15 | use Notifiable, SoftDeletes; |
||
16 | |||
17 | /** |
||
18 | * The attributes that are mass assignable. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $fillable = [ |
||
23 | 'first_name', |
||
24 | 'last_name', |
||
25 | 'email', |
||
26 | 'username', |
||
27 | 'phone', |
||
28 | 'bio', |
||
29 | 'birthdate', |
||
30 | 'active', |
||
31 | 'password', |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * The attributes that should be hidden for arrays. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $hidden = [ |
||
40 | 'password', |
||
41 | 'remember_token', |
||
42 | 'created_at', |
||
43 | 'updated_at', |
||
44 | 'deleted_at', |
||
45 | 'id', |
||
46 | 'phone', |
||
47 | 'active', |
||
48 | 'username', |
||
49 | 'is_active', |
||
50 | 'birthdate', |
||
51 | 'email' |
||
52 | ]; |
||
53 | |||
54 | /** |
||
55 | * The dates attributes. |
||
56 | * |
||
57 | * @var array $dates |
||
58 | */ |
||
59 | protected $dates = [ |
||
60 | 'created_at', 'updated_at', 'deleted_at' |
||
61 | ]; |
||
62 | |||
63 | protected $appends = [ 'is_active' ]; |
||
64 | |||
65 | /** |
||
66 | * Returns the full name of user. |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | public function getFullNameAttribute($value) |
||
74 | |||
75 | /** |
||
76 | * Returns the campaigns created by the user. |
||
77 | * |
||
78 | * @return array relationship |
||
79 | * @var array |
||
80 | */ |
||
81 | public function campaigns() |
||
85 | |||
86 | public function donor() |
||
90 | |||
91 | /** |
||
92 | * Return as Many invites created by user. |
||
93 | */ |
||
94 | public function invites() |
||
98 | |||
99 | /** |
||
100 | * Returns the comments created by the user. |
||
101 | * |
||
102 | * @return array relationship |
||
103 | * @var array |
||
104 | */ |
||
105 | public function comments() |
||
109 | |||
110 | public function getIsActiveAttribute() |
||
114 | |||
115 | /** |
||
116 | * Get the route key for the model. |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getRouteKeyName() |
||
124 | } |
||
125 |