◀ STAGE: BLOG

×00 PLAYER 01

STAGE 04

DEV DIARY

A collection of thoughts, experiments, and things I build along the way.

Save
Files

Load a story to read

SAVE SLOT 01

Dev Story16 MAY 2026

Learning Laravel Routes

A story about how I finally understood web.php in Laravel and routing system.

SAVE SLOT 02

?

Empty slot — the next story is still being written.

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.