Dan
Dan
TCTwill CMS
Created by Dan on 1/21/2024 in #👊support
Issue using repository methods??? Twill 3
Can someone please provide any support for the following error: Declaration of App\Repositories\PostRepository::afterSave($object, $fields) must be compatible with A17\Twill\Repositories\ModuleRepository::afterSave(A17\Twill\Models\Contracts\TwillModelContract $model, array $fields): void I have been looking to set up a repeater as per the twill guidance docs with the following in my PostRepository (however I'm running into some errors): public function afterSave($object, $fields) { $this->updateRepeater($object, $fields, 'credit', 'Credit'); parent::afterSave($object, $fields); } public function getFormFields($object) { $fields = parent::getFormFields($object); $fields = $this->getFormFieldsForRepeater($object, $fields, 'credit', 'Credit'); return $fields; } Within my twill.config I have set up the repeater: 'repeaters' => [ 'credit' => [ 'title' => 'Credit', 'trigger' => 'Add credit', 'component' => 'a17-block-credit' ] ], So am unsure where this error is coming from, any direction would by greatly appreciated. Best, Dan
3 replies