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

sshateri's avatar

Route::get vs Route::any

im trying to understand the difference between Route::get and Route::any but was not able to understand it fully after reading the Laravel documentation. could you guys explain it for me, please?

0 likes
4 replies
Jaytee's avatar
Jaytee
Best Answer
Level 39

Route::get() will only respond to GET requests (e.g: loading a view)

Route::any() will match all REST HTTP verbs. e.g: GET, POST, PUT, PATCH, DELETE, OPTIONS

3 likes
sshateri's avatar

Oh wow. thanks buddy. Simple and straight forward answer. You're awesome 👍

1 like

Please or to participate in this conversation.