Laravel 7.x — P3 : First Route

Laravel 7.x — P3 : First Route

The primary job of any framework is toThe primary job of any framework is to process requests. It’s important to know that the user will attempt to retrieve a page from your site, or submit a data to your site. What happens when the request enters the Laravel framework? How is Laravel able to retrieve the content that the user wants and return it to the user? This is a topic that’s beyond the scope of this article. process requests. So let’s look at routes.

The primary job of any framework is to process requests. It’s important to know that the user will attempt to retrieve a page from your site, or submit a data to your site. What happens when the request enters the Laravel framework? How is Laravel able to retrieve the content that the user wants and return it to the user? This is a topic that’s beyond the scope of this article.

What we want to know is when a user requests for a specific page, like the about page, how can we provide him/her with the about page content consistently?

Before we create our first route, we should be aware that Laravel is an MVC framework. Don’t overthink this term; it just stands for Model-View-Controller. Think of the model _as your database table. The _view _is the HTML/CSS (and even JavaScript) content that’s given back to the user. If you are looking at the page, that’s the _view. Laravel returned the HTML to your browser and your browser was able to translate the script into a visual representation of the HTML/CSS code. The controller _is what communicates with the _model _and the _view. It first receives the request from the user. If any data is stored in the database, the controller _tells the _model _to retrieve the data. The _model _returns the data to the controller_ and the controller _passes the data to the _view. Once the _view _is generated, the _controller _returns the _view _to the user.

But how does the _controller _get called in the first place? If we can have hundreds of controllers, how does Laravel know which _controller _to call? By looking at the routes that are specified in the routes file (routes/web.php).

laravel programming software-development php web-development

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

PHP Web Application Development Company

As a top **PHP Web Application Development Company in USA**[https://www.dataeximit.com/php-development-services/](https://www.dataeximit.com/php-development-services/ "https://www.dataeximit.com/php-development-services/"), we at Data EximIT have...

PHP Website Development

Skenix Infotech is a leading PHP Web Development Company that helps companies get results with industry best practices. Get affordable PHP Development Services.

Laravel Development Company

Skenix Infotech is a top Laravel Website Development Company with Expert Laravel Developers that provides robust Laravel Development Services at fair costs.

Hire Dedicated PHP Developer

Looking to hire affordable yet experienced PHP developers? **[Hire Dedicated PHP Developer](https://hourlydeveloper.io/hire-dedicated-php-developer/ "Hire Dedicated PHP Developer")**, who can convert your idea to reality, within the stipulated...