*/ protected $fillable = [ 'name', 'email', 'dob', 'password', 'badges', 'invited_by', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', 'badges' => 'array' ]; public static function isAdmin() { if (Auth::guest() || !Auth::user()->admin) { return false; } else { return true; } } public function feedposts() { return $this->hasMany('App\Models\FeedPost'); } public function settings() { return $this->hasOne('App\Models\UserSetting'); } }