Dev Story
16 MAY 2026
Learning Laravel Routes
When I first started learning Laravel, I simply did not understand anything about routes/web.php files.
For example, I remember seeing something like this for the first time:
Route::get('/', function () { return view('welcome'); });
And I thought to myself: "Okay... But how does this actually works?"
That way, the whole thing seemed quite unreal at the moment. I had entered some URL into the address bar, and Laravel showed me the required page automatically.
Then I decided to try my hand and create my first route, /about.
It worked, and I understood that each and every URL of my site corresponds to something inside web.php.
The other amazing thing I found out about was controllers, thanks to them I was able to organize my code better, placing it not only in web.php.
Today, when I look through routes/web.php, all I can see there is a "map" of my application, very simple but extremely powerful.
And such a small thing in a framework can actually become very important indeed.