What is Model View Controller (MVC) In Laravel 8 - Explained

What is Model View Controller (MVC) In Laravel 8 - Explained

·

2 min read

Hi, I am Sk Shoyeb a full stack developer. In this article, I will explain to you what is Model, View, Controller, or MVC in Laravel.

If you want to learn Laravel or you are a Laravel beginner, you should know what is MVC and its roles very well.

What Is MVC

MVC stands for Model View Controller structure. This is a very useful development structure and also very popular in the market. Laravel has these features and this is why Laravel is one of the most used frameworks now.

What is Model in Laravel

Model is where we perform the database-related operations. Like, insert, delete, edit, update query, etc. The model folder exists in the App folder in Laravel 8. Here you have to create models corresponding to the database tables.

Like if your table name is users, where you want to do operations through a model then the model name will be User.

What is View

The view is where we store our front-end templates. These are called blade templates.

What is Controller

The controller is the central part of the MVC model. The controller controls the model and views. Also, this is responsible for the Application logic.

The controller takes the user input values from the view and passes the values to the model. Then also return the data from the model to view.

Did you find this article valuable?

Support Sk Shoyeb by becoming a sponsor. Any amount is appreciated!