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