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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners