'datetime', 'password' => 'hashed', ]; } public function posts(): HasMany { return $this->hasMany(Post::class); } public function comments(): HasMany { return $this->hasMany(Comment::class); } public function getSearchResult(): SearchResult { $url = url("/profiles/$this->id"); return new SearchResult( $this, $this->name, $url ); } }