protected function getFormActions(): array
{
return [
...parent::getFormActions(),
Actions\Action::make('saveAndNext')
->action(function () {
$nextRecord = $this
->getRecord()
->where('id', '>', $this->getRecord()->id)
->orderBy('id', 'asc')
->first();
$this->save();
redirect(static::getResource()::getUrl('edit', ['record' => $nextRecord]));
}),
];
}
protected function getFormActions(): array
{
return [
...parent::getFormActions(),
Actions\Action::make('saveAndNext')
->action(function () {
$nextRecord = $this
->getRecord()
->where('id', '>', $this->getRecord()->id)
->orderBy('id', 'asc')
->first();
$this->save();
redirect(static::getResource()::getUrl('edit', ['record' => $nextRecord]));
}),
];
}