*/ public function toArray($request) { return [ ...parent::toArray($request), 'links' => [ 'update' => route('formtemplate.update', ['formtemplate' => $this->getModel()]), 'destroy' => route('formtemplate.destroy', ['formtemplate' => $this->getModel()]), ] ]; } /** * @return array */ public static function meta(): array { return [ 'base_url' => url(''), 'groups' => Group::forSelect(), 'fields' => Field::asMeta(), 'namiTypes' => NamiType::forSelect(), 'specialTypes' => SpecialType::forSelect(), 'links' => [ 'store' => route('formtemplate.store'), 'form_index' => route('form.index'), ], 'default' => [ 'name' => '', 'config' => [ 'sections' => [], ] ], 'section_default' => [ 'name' => '', 'intro' => '', 'fields' => [], ] ]; } }