*/ use HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'phone', 'role', 'account_status', 'status', 'avatar', 'last_active_at', 'last_login_at', 'last_login_ip', 'last_login_user_agent', 'parent_gender', 'tanggal_lahir', 'password', 'otp_code', 'otp_expires_at', 'api_token', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', 'otp_code', 'api_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'otp_expires_at' => 'datetime', 'tanggal_lahir' => 'date', 'last_active_at' => 'datetime', 'last_login_at' => 'datetime', 'password' => 'hashed', ]; } public function children(): HasMany { return $this->hasMany(Child::class); } public function nutritionist(): HasOne { return $this->hasOne(Nutritionist::class); } }