you need some javascript...
one of the example
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello how are you.
I wanted to know if there is any possibility of redirecting to two different routes at the same time.
I have an order system.
What I want to do is that when an order is confirmed, automatically, the order goes to an "Accepted" state and that it opens a URL to be able to contact the customer through WhatsApp (New tab that opens WhatsApp web with the WP API ) and at the same time return to the order page with back ()
I show you the controller I have so you can see how it would be.
public function accept(Request $request)
{
// dd($request->all());
$order = Order::find($request->acceptorderid);
$order->update([
'state' => 'accepted'
]);
// Searching the internet I thought I could do it this way, but I found no result.
$newUrl='https://wa.me/'.str_replace('-', '', whatsappNumberCustomer($order)).'?text='.urlencode(whatsappMessageCustomer($order));
session()->flash('newurl', $newUrl);
// =============================================
return back()->with('success_message', 'Pedido aceptado.');
}
Thank you.
you need some javascript...
one of the example
Please or to participate in this conversation.