We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
14 | class User extends Authenticatable |
||
15 | { |
||
16 | use Notifiable, SoftDeletes, Uuids; |
||
17 | |||
18 | /** |
||
19 | * The attributes that are mass assignable. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $fillable = |
||
24 | [ |
||
25 | 'first_name', |
||
26 | 'last_name', |
||
27 | 'email', |
||
28 | 'username', |
||
29 | 'phone', |
||
30 | 'country_code', |
||
31 | 'bio', |
||
32 | 'birthdate', |
||
33 | 'active', |
||
34 | 'password', |
||
35 | 'blood_type_id', |
||
36 | ]; |
||
37 | |||
38 | /** |
||
39 | * The attributes that should be hidden for arrays. |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $hidden = |
||
44 | [ |
||
45 | 'password', |
||
46 | 'uid', |
||
47 | 'remember_token', |
||
48 | 'created_at', |
||
49 | 'updated_at', |
||
50 | 'deleted_at', |
||
51 | 'phone', |
||
52 | 'active', |
||
53 | 'username', |
||
54 | 'is_active', |
||
55 | 'birthdate', |
||
56 | 'email', |
||
57 | 'blood_type_id' |
||
58 | ]; |
||
59 | |||
60 | /** |
||
61 | * Indicates if the IDs are auto-incrementing. |
||
62 | * |
||
63 | * @var bool |
||
64 | */ |
||
65 | public $incrementing = false; |
||
66 | |||
67 | /** |
||
68 | * The dates attributes. |
||
69 | * |
||
70 | * @var array $dates |
||
71 | */ |
||
72 | protected $dates = |
||
73 | [ |
||
74 | 'created_at', |
||
75 | 'updated_at', |
||
76 | 'deleted_at' |
||
77 | ]; |
||
78 | |||
79 | protected $appends = |
||
80 | [ |
||
81 | 'is_active' |
||
82 | ]; |
||
83 | |||
84 | /** |
||
85 | * Returns the full name of user. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getFullNameAttribute($value) |
||
93 | |||
94 | /** |
||
95 | * Get user avatar or set default.png as default. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getAvatarAttribute($avatar) |
||
103 | |||
104 | /** |
||
105 | * Returns the campaigns created by the user. |
||
106 | * |
||
107 | * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship |
||
108 | * @var array |
||
109 | */ |
||
110 | public function campaigns() |
||
114 | |||
115 | /** |
||
116 | * Related. |
||
117 | * |
||
118 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
119 | */ |
||
120 | public function bloodType() |
||
124 | |||
125 | /** |
||
126 | * Return as Many invites created by user. |
||
127 | */ |
||
128 | public function invites() |
||
132 | |||
133 | /** |
||
134 | * Returns the comments created by the user. |
||
135 | * |
||
136 | * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship |
||
137 | * @var array |
||
138 | */ |
||
139 | public function comments() |
||
143 | |||
144 | public function getIsActiveAttribute() |
||
148 | |||
149 | /** |
||
150 | * Get the route key for the model. |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getRouteKeyName() |
||
158 | |||
159 | /** |
||
160 | * Get the user phone number |
||
161 | * |
||
162 | * @return string |
||
163 | */ |
||
164 | public function getPhoneNumberAttribute() |
||
168 | |||
169 | } |
||
170 |