PHP Framework Laravel: MVC Pattern

Hello Steemians

How is everyone? Hope everybody is well. Today I will talk to you about another fold of PHP Laravel which is MVC pattern and MVT pattern. Jetty is much more necessary to learn Laravel.

First we will learn what is MVC pattern?
M = Model
V = View
C = Controller

Model:

Model is the model we need if we have a connection to the database or if we use the database. We will use the model in all database related issues such as joining data.

View:

What we see. This means that when we look at a webpage, the type of text or image that appears in front of us is view.
aasdf.jpg
Screenshot from here

Controller:

Controller is where we write the logic and our programming logic or if we write any logic after creating our website then we will write it in the controller.


Source of the image

If you go to a browser and go to a link like we do HTTP dot something it means you want to go to that website. When someone searches a website by typing a link to a website, it first goes to the route, then from the route to the controller, then if any data has to be fetched from your database, then the request goes, then collects the data from the controller to the model and then gives it to the controller. From the view then we who are normal users will see it. And if you don't have to fetch it from a database, then the direct viewer will leave the controller and the user will see it. This is the main function of MVC. Then we will look at all this again through coding.

I hope you all have a good idea about MVC and understand. If there is any problem then please let me know by commenting. I will try my best. Thank you for solving your problems.

Best Regards
@msharif

H2
H3
H4
3 columns
2 columns
1 column
1 Comment