only(['descriptor', 'id']) ->mapWithKeys(function($item,$key) { if ($key == 'id') { return ['id' => $item]; } return ['name' => $item]; })->toArray(); return (new self($item)); } public function subactivities() { return Nami::subactivitiesOf($this->id); } }