*/ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'meta' => 'array', 'last_active_time' => 'datetime', ]; } public function role(): HasOne { return $this->hasOne(Role::class, 'id', 'role_id'); } public function orders(): HasMany { return $this->hasMany(Order::class); } }