Little trick to pass a data table to your method with laravel. /* * Url schema * http://127.0.0.1:8000/api/messages/?message[]=450&message[]=451&message[]=452 */ //Endpoint Route::delete('messages/{message?}', [MessageController::class, 'delete']); // Methode delete of MessageController public function delete(Request $request){ $messageIds = $request->message; Message::delete($messageIds); } // The variable $messageIds will be an array containing the ids of the messages // to be deleted by the function, when you use dd($messageIds) you can see!
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners