Introduction to Laravel — Laravel 10 Discovery Training
Welcome to this new training dedicated to discovering and learning the PHP Laravel framework.
What is Laravel?
A framework is a set of preconceived classes that will allow you to do traditional tasks more quickly and easily (you will have classes to communicate with the database, validate data, manage URLs…). All of this will already be included for you and organized in a certain way to make you as productive as possible and so that you can focus on what interests you, the business logic of your application.
Laravel is a framework that follows the MVC structure (for Model View Controller), which is a way of organizing code that is very widespread and found on most modern frameworks today. Also, what you will learn with Laravel will also be valid for other frameworks.
This training will be dedicated to Laravel version 10 (the most recent version at the time I am recording this training) and requires PHP 8.1.
Training program
At first we will make a small overview of the framework, we will start by installing it then we will analyze the structure of the folders and the basic components which constitute the MVC. We will discover in particular Routing, Controllers, the Eloquent ORM and the template blade engine.
We will then dive a little deeper into certain features through a practical application with the creation of a blog. This will be an opportunity to discover how to manage forms efficiently and manage the relationship between data.
Then, we will deepen some elements and we will try to understand how the framework works internally. We will discover the life cycle that allows Laravel to understand a request and transform it into a response.
Finally, we will end with practical work with a concrete example of setting up Laravel for a specific project.
Prerequisites
To successfully complete this course, there are a few prerequisites. The first is to be comfortable with PHP, understand the basics of the language and object-oriented programming. I will not return to the principle of class, instance, the notions of public, protected and private. It is imperative that all this is acquired otherwise you may have trouble following the explanations.
Then, you also have to know how to use the terminal. You don’t need to be an expert, but a lot of operations in Laravel are done through the terminal (like starting a server or generating code) so you need to have a little experience with that.
It will also be necessary to know how to use Composer because it is what will allow us to create our Laravel project but also to install different extensions when we need them.
And finally, you also need to understand SQL. Even if you don’t need to be an expert, understanding the basic operation (especially the concept of foreign key and relation) is essential. This will allow you to advance a little faster in this formation. If you don’t know what SQL is at all, I invite you to watch my training on the subject.
If you have these prerequisites and you are motivated, I will meet you in the first chapter where we will install Laravel and we will discover the folder structure.