Join Joseph Lowery for an in-depth discussion in this video Understanding Laravel, part of Laravel 4 Essential Training (2014).
- As with any finely crafted framework, it helps to get a general sense of Laravel before exploring the details. So I want to take this lesson to do just that, what Laravel is, how it works, and why it's worthy of consideration for your PHP project development. Essentially, Laravel is a PHP framework for building web applications. It was initially developed by Taylor Otwell, and is currently maintained by him as well. It was first released in early 2012, and it's regularly updated, with version 4.2.8, the one used in this course, released in August 2014.
And very importantly, Laravel is a free, open source project under the MIT License. Laravel is a specific type of PHP framework, an MVC framework. MVC is short for Model-View-Controller, which is a software structure with an emphasis on modularity. Each of the three component parts of an MVC framework like Laravel has a particular role. The Model is the application data and the functions.
The View is the representation of the output, like an HTML page. And the Controller handles the interaction between the user as well as the other two components of the MVC structure, Model and View. To me, one of the most interesting aspects of Laravel is its Real-World Foundation. It recognizes that most web applications frequently require commonly used functions. To that end, Laravel includes, among many others, authentication for verifying users and handling access to web pages and segments properly.
Routing for directing URI and other requests efficiently, whether within the app or without. Database management, as well as input and output control. And sending email, whether it's just text or HTML with inline or external attachments. One of the reasons developers are finding Laravel so compelling is that it's built on a strong foundation of components that are arguably the best in their class. One such component is Symfony, which serves to provide core functionality, such as browser simulation, file system access, and debugging.
Befitting a modular framework, each Laravel project depends on a wide range of code packages, and these are handled by Composer, a PHP dependencies manager. Composer has hundreds of packages available. And, following object-oriented best practices, Laravel's database management relies on eloquent ORM, or Object Relational Mapping, which provides Ruby on Rails-like migration. We'll dive deeper into each of these components in the next lesson.
Need a quick dive into Laravel? Check out this short primer, Up and Running with Laravel.
- Installing Laravel and Composer
- Routing requests
- Filtering routes
- Incorporating advanced controllers
- Creating a basic Blade template
- Developing a layout with child pages and forms
- Integrating a database
- Creating tables via migrations
- Outputting data
- Building a Laravel app
- Authenticating users
- Deploying Laravel code