Support the ongoing development of Laravel.io →
Configuration

Hi;

Can someone please explain how Route::get and Route::post work?

I know exactly how to use them but I want the mechanism behind them. I want to know where is get nad where is post functions in the laravel core files.

Thank you

Last updated 3 years ago.
0

You can find the laravel source here:

https://github.com/laravel/framework

If you need help finding a specific class/function, you can search the laravel api to find its path:

http://laravel.com/api/4.1/

For Route::get and post, you can find them here around line 140:

https://github.com/laravel/framework/blob/master/src/Illuminate/Routing/Router.php

and follow where it goes :)

get/post/put/delete/etc methods pretty much just register the uri in the router routes property, then the router matches the request uri with one, then matches it your specified controller method / closure.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.