$this->name, 'id' => $this->id, 'subactivities' => $this->subactivities->pluck('id')->toArray(), 'is_filterable' => $this->is_filterable, 'links' => [ 'edit' => route('activity.edit', ['activity' => $this->getModel()]), 'update' => route('activity.update', ['activity' => $this->getModel()]), 'destroy' => route('activity.destroy', ['activity' => $this->getModel()]), ], 'subactivity_model' => [ 'activities' => [$this->id], 'is_age_group' => false, 'is_filterable' => false, 'name' => '', ], ]; } /** * @return array */ public static function meta(): array { return [ 'subactivities' => SubactivityResource::collectionWithoutMeta(Subactivity::get()), 'filter' => ActivityFilterScope::fromRequest(request()->input('filter')), 'links' => [ 'index' => route('activity.index'), 'create' => route('activity.create'), 'membership_masslist' => route('membership.masslist.index'), ], ]; } }