*/ protected $fillable = [ 'name', 'email', 'avatar', 'password', 'total_votes', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'id', 'password', 'remember_token', 'email_verified_at', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'has_password' => 'boolean', ]; } public function userProviders(): HasMany { return $this->hasMany(UserProvider::class); } public function votes() { return $this->hasMany(Vote::class); } public function mustVerifyEmail(): bool { return $this instanceof MustVerifyEmail && !$this->hasVerifiedEmail(); } }