CreatModel edit getFormActions based on a condition.

I need to run specific checks on different CreateModel's form actions. All i need to do is return "create" , "save and create another" and cancel depending on the condition. Now getCreateFormAction() is available but i cant seem to find other options for "cancel" and "create"

Is this built in or do i need to create it from scratch?

protected function getFormActions(): array
{
$user = auth()->user()->phone;

if ($user !== null) {
return [
$this->xxxCancel();
];
}
return [
$this->getCreateFormAction(),
$this->xxxCreateAndCreateOther(),
$this->xxxCancel();
];
}
Was this page helpful?