Components of Laravel :-
When interacting with a Laravel application, a browser sends a request, which is received by a web server and passed on to the Laravel routing engine.
The Laravel router receives the request and redirects to the appropriate controller class method based on the routing URL(Uniform Resource Locator) pattern.
The controller class then takes over. Commonly, the controller interacts with a model, which is a PHP object that represents an element of the application and is in charge of communicating with the database.
After invoking the model, the controller then renders the final view (HTML, CSS, and images) and returns the complete web page to the user’s browser.
Laravel promotes the concept that models, views, and controllers should be kept quite separate by storing the code for each of these elements as separate files in separate directories. This is where the Laravel directory structure comes into play.
Design patterns such as MVC are created to make a developer’s life easier.
No comments:
Post a Comment