| Total Complexity | 3 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class User extends Authenticatable |
||
| 11 | { |
||
| 12 | use Notifiable; |
||
|
|
|||
| 13 | |||
| 14 | /** |
||
| 15 | * The attributes that are mass assignable. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $fillable = [ |
||
| 20 | 'name', 'biography', 'profile_picture', 'email', 'password', 'provider', 'provider_id' |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The attributes that should be hidden for arrays. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $hidden = [ |
||
| 29 | 'password', 'remember_token', |
||
| 30 | ]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * The attributes that should be cast to native types. |
||
| 34 | * |
||
| 35 | * @var array |
||
| 36 | */ |
||
| 37 | protected $casts = [ |
||
| 38 | 'email_verified_at' => 'datetime', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var array |
||
| 43 | */ |
||
| 44 | protected $dates = [ |
||
| 45 | 'created_at', |
||
| 46 | 'updated_at' |
||
| 47 | ]; |
||
| 48 | |||
| 49 | public function thread() { |
||
| 50 | return $this->hasMany('App\Thread', 'user_id'); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $str |
||
| 55 | */ |
||
| 56 | public function trimStr(string $str) |
||
| 62 | } |
||
| 63 | } |
||
| 64 |