Laravel is, according to its documentation, the PHP framework for web artisans. This is a reference to its carefully crafted components, as Laravel is one of the greatest examples of good programing practices and workflow. While it is based on other frameworks, such as Symfony, Laravel delivers a more digested version of a framework that is easy and ready-to-use, and is heavily documented.
- [Instructor] Laravel is a PHP framework that helps us develop web applications in PHP. Its first versions heavily emulated early versions of Ruby on Rails and on later versions focused more on its dependency injection mechanism. As a framework, it's composed of a series of tools, libraries, and assets that are ready to use out of box. It's based on the MVC paradigm, which allows the developer to extract applications into a business layer, the model, a rendering layer, the view, and an application layer, the controller.
Like most frameworks nowadays, Laravel depends heavily on Composer to handle its dependencies. Since Laravel is concocted from various libraries, it keeps them neat and tidy. It's partially based on Symfony, which is why part of the file structure and syntax is similar. Let's take a look at what Laravel requires to work properly. The minimum PHP version for Laravel to work is 5.6.4. Laravel will also work with PHP's latest version, PHP 7.
For the data layer, Laravel uses the PDO extension that comes with PHP. For security reasons, Laravel uses OpenSSL, Mbstring, Tokenizer, and XML. All these extensions should be enabled in your development, staging, and production environments. Among the key features that Laravel offer are the following. PSR-4 autoloading compliance, which translates into every class being fully namespaced.
Its dependency injection mechanism makes DI so much simpler than it was before with its IoC, or Inversion of Control, in version 4. Laravel now comes with a built-in, ready to use and implement authentication mechanism. It even comes with a password recovery feature. Laravel is a good choice for developers who want a simple yet strong foundation for their application. Laravel is also a flexible choice, meaning that it serves for small, medium, and large projects.
- Laravel file and folder structure
- Dependency injection
- Routing requests to controllers
- Loading a view
- Creating a basic Blade template
- Sending data to a view
- Creating and validating forms
- Integrating a database
- Modifying data with Eloquent
- Returning data to a Laravel view
- Adding relational data and concurrent connections