Laravel Crash Course - How to work with Controller

  Рет қаралды 256

TutsPrime

TutsPrime

Күн бұрын

As you might already know Laravel is PHP framework which follow MVC (Model View Controller) architecture pattern. And we went over the View and model parts In the previous couple of lessons.
Now in this lesson we're going to learn another part of MVC which is Controller. In theory Controller is responsible for controlling the execution flow of the application. It acts as a directing traffic between Views and Models
The controller receives an input from the users and makes calls to model and the view to perform appropriate actions.
Although in practise we can control the execution flow in our routes as we done so far, but that way could be OK if our code only contain a simple logic. As our application grows, the logic could become more complex and our code could become larger and larger. That's why doing that way may not ideal.
That's why it's better to put our code into controller. This will make your code better organized and easy to maintain.

Пікірлер
Laravel Crash Course - Validating data
8:09
TutsPrime
Рет қаралды 176
Laravel Crash Course - API Resources
10:41
TutsPrime
Рет қаралды 6 М.
Men Vs Women Survive The Wilderness For $500,000
31:48
MrBeast
Рет қаралды 49 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 47 МЛН
Elon's Big Bet On Tesla's Future | Optimus 2
18:07
Ryan Shaw
Рет қаралды 90 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 172 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
Laravel 10 tutorial - Build a REST API from scratch
30:00
TutsPrime
Рет қаралды 36 М.
The Tools I Use to Build Products in Laravel
19:00
Josh Cirre
Рет қаралды 27 М.
Laravel 11 Tutorial for Beginners - Laravel Crash Course (2024)
1:22:20
The Codeholic
Рет қаралды 170 М.