Closed mrizkihidayat66 closed 1 month ago
Hi @mrizkihidayat66, you can call the beforeBack()
method of the Step
class in beforeBackWizardStep()
hook of the WizardController
:
use Illuminate\Http\Request;
class UserWizardController extends Controller
{
protected function beforeBackWizardStep(Request $request)
{
/** @var mixed $step */
$step = $this->wizard()->stepRepo()->current();
if (method_exists($step, 'beforeBack')) {
$step->beforeBack();
}
return true;
}
}
Now you can add the beforeBack()
method into your Step
class:
class EmailStep extends Step
{
public function beforeBack()
{
// do something
}
}