Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jericopulvera's avatar

Route::get to delete vs Route::delete

What is the difference if I use Route::get to delete a data vs Route::delete?

0 likes
4 replies
tomopongrac's avatar

with Route::get you perform delete with get request...

with Route::delete you perform delete data with post request here you in your form put method field delete

<form method="POST">
    {{ method_field('DELETE') }}
</form>

https://laravel.com/docs/5.3/helpers#method-method-field

i would suggest second approach with post request

1 like
martinbean's avatar
Level 80

@Eco012390 You shouldn’t use GET requests for deleting data. It’s an operation with a side affect, and can also be triggered by bots merely following links.

2 likes

Please or to participate in this conversation.