avatar); } public function isAuthorOf($model) { return $this->id == $model->user_id; } public function replies() { return $this->hasMany(Reply::class, 'user_id'); } public function topics() { return $this->hasMany(Topic::class); } }