One possible workaround that I thought of is to return the redirect URL in a JSON return similar to my upload submit. Then in the JavaScript I could simply redirect. I think this may work, but I'm not sure how to get my success/warning/error messages. Can you post a flash message/variable from JavaScript? Is there a JavaScript equivalent to using ->with(...)?
JS (in complete method)
...
case "post":
window.location.replace(data.url);
break;
}
Controller
} elseif(Input::get('post')) {
$response = array(
'type' => 'post',
'url' => URL::to('/'),
'success' => true);
return Response::json($response);
...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community