Laravel framework is one of the most popular frameworks at the moment. The framework has earned its popularity due to the rapid development, the built-in script and styles, and most importantly, its own and very convenient template engine. On top of that, a very flexible formation of routes, which is undoubtedly a huge plus.
Official documentation is best suited to learn Laravel. Moreover, an excellent video course from Laracasts is an integral part of studying this framework. This is a beautiful resource. With it, you can find not only useful video tutorials on the Laravel framework. But also additional tools for developing a full web application based on Laravel. That in addition to solid principles in PHP for correct construction of your application, and video tutorials on Vue.js framework, which I recommend as the front-end part of your web application.
THE BLADE TEMPLATING ENGINE
One significant plus in Laravel is its blade templating engine.
After successfully reading the documentation and watching the video course, you will be ready to create a web application. This process is very entertaining and absorbs you completely. For example, we take the construction of a blog with the possibility of expanding it to the web store, as implemented in WordPress + Woocommerce.
The best practice will be to use a modular system for building an application. This is very convenient and most importantly, a proper hierarchy of all your files, which is an advantage if other developers will use your code in the future. Best of all, you will learn to order in your web application.
Now we come to one of the most important things in this learning experience: creating a database for a future web application. On the one hand, the database should be straightforward. On the other hand, it has to be quite flexible.
In the database, we will need to keep a lot of different data, such as data of users, posts, pages, categories, tags, comments, user roles and user permissions. A wise thing to do is to the good is to create a table for the media library, and maintain a connection between media files on your disk and some posts. Then, once a month, you can delete all media files, but not media which were uploaded previously and belong to some pages, posts or products. And for the store, we should also keep data categories of tags and prices: the standard price and the discount price. For all of that, we need different tables in our database.
Laravel has a command line interface through which you can create all the necessary files for work, such as modules, controllers, models, migrations, etc.
THE CREATION PROCESS
The creation process is straightforward. We create a migration path for the user table via the command line interface (there is a standard artisan command). Then we need to create a controller, model, and migration for roles, user permissions, and then for user roles. We do all that so in the end, we can connect everything. And in the future, each user will have a role, and each, in turn, will have its permissions for the user.
If using a standard command to create a controller, model and migration, there will not be enough fields in the new table for the user in the migration file. For this specific reason, the first thing we need to do is add the missing fields.
Another important feature is to realize the activation of the user account. For this, there are two ways. The first way is to activate it through Laravel. The second way is to enable it on its own, which is not difficult. When using the standard method through Laravel, you speed up the development process, because everything is written thinking of you. This is a massive advantage of this framework in comparison with the rest.
Once all of the above has been completed, you can begin installing a modular system for a web application.
THE MODULAR SYSTEM