You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, the only solution I've found for the redirection issue is the following:
publicfunctionactionCreate()
{
$model = newThirdParty();
if ($this->request->isPost) {
if ($model->load($this->request->post())) {
return$this->response->redirect(['ecommerce/third'], 302, checkAjax: false);
}
}
//dd("redirect");return$this->inertia('ThirdParty/Create');
}
This code is used to handle the creation of a resource in an application and address issues related to redirection within the context of Inertia.js. The key here is that the AJAX validation is being turned off in the redirection by using checkAjax: false to ensure that the redirection works correctly with Inertia.js.
If someone finds a better solution, I would appreciate it.
Hi there,
The issue occurs when performing redirects. After saving a resource and then redirecting, it only displays a blank modal. I don't know why.
This code works if I don't use
route.post(url, model);
` public function actionCreate()
{
$model = new ThirdParty();
`
Any idea why?
thanks.
The text was updated successfully, but these errors were encountered: