protected function beforeFill(): void
{
$state = [];
$locales = config('app.locales');
foreach ($locales as $locale) {
$state['translations'][$locale]['name'] = $this->record->getTranslation($locale)->name ?? '';
$state['translations'][$locale]['description'] = $this->record->getTranslation($locale)->description ?? '';
}
$state['category_id'] = $this->record->category_id;
$state['price'] = $this->record->price;
$this->form->fill($state)->getState();
}
protected function beforeFill(): void
{
$state = [];
$locales = config('app.locales');
foreach ($locales as $locale) {
$state['translations'][$locale]['name'] = $this->record->getTranslation($locale)->name ?? '';
$state['translations'][$locale]['description'] = $this->record->getTranslation($locale)->description ?? '';
}
$state['category_id'] = $this->record->category_id;
$state['price'] = $this->record->price;
$this->form->fill($state)->getState();
}