Skip to content

Glossary

Laravel routing: the way from an address to the code

The mapping that decides which address in the browser calls which part of the application.

Every application has to decide what should happen when somebody calls a particular address. That mapping is called routing. In Laravel it sits in files of its own and reads like a table of contents for the application: this address shows a list of invoices, that one accepts a form, a third delivers data to an app.

For a conversation about a project it is the most useful entry point there is. Reading the route file shows you in a few minutes what an application can do, without understanding a line of logic.

Why this is a business decision

Addresses are visible from outside and stay for a long time. They turn up in bookmarks, in emails, in search results, in other systems pointing at your application. A structure that mirrors the business lasts for years. One that mirrors the database tables becomes embarrassing as soon as the tables change.

So the address structure belongs at the start of a project and not at the end. For interfaces serving other systems that goes double, because other people’s programs depend on them. How we build that is under API and backend development.

FAQ

Häufige Fragen

Can addresses still be changed later?
Technically in minutes, in practice rarely without consequences. Change an address and you have to redirect the old one, otherwise bookmarks and search results run into nothing. On public pages a change also costs visibility until Google has taken up the new address. So it is worth settling the structure calmly, once.

Related

Terms that belong with this one

A project, or a question?

Write and tell us what it is about. You get an assessment from somebody who works with Laravel themselves, not from a sales desk.