What is Laravel

W

Defined as a PHP-like open source programming language, Laravel has gained a large number of programmers through the simplicity and ease of its interface. Considered not just easy to install and used but also elegant, Laravel presents that attractiveness dose that can delight the web developer’s technical eye, who wants to create good looking layouts without advanced knowledge of web design or product design.

Laravel solves one of the most common developer problems: the fast delivery of a validated and well-priced product at the market level. It is also extremely important to develop a product that expresses professionalism, seriousness or convince consumers to go to the next step, that of actually buying from you.
A strong community of developers and testers has been built around this framework, trained by their own experience, to provide real solutions to the problems the developers have. Laravel is one of the most popular PHP frameworks because it allows you to build any kind of web application with PHP.

Benefits:
1. The “bundled modularity” option that allows you to reuse the code without too many complications;
2. It uses Blade as an engine template to speed up task creation;
3. Users can add new features as they appear;
4. The feature of reverse routing and an understanding of Artisan CLI, including advanced tools and migration in task execution;
5. Laravel is a framework that supports the DRY (Do not Repeat Yourself) principle meaning that a functionality is written without error and for once.

Disadvantages:
1. Complex methods that are included in reverse routing;
2. Although it is easy to use even for amateur web developers, there may occur problems when they try to expand classes and codes.

The initial setup:

1. Setting the database – The database setting is made from the database.php file, which is located in app/config. As we can see, Laravel allows the use of many drivers to connect to the database.

2. Setting up the authentication system – In order to create a logging system in Laravel we will use a very good module offered by the application. This is called Authentication. In order to ensure as much security as possible, we will keep the session data in the database. To do so, you have to open the session.php file in app/config and change the driver used. ‘Driver’ => ‘database’

As we can see, there are several settings in this file:
1.Lifetime is the validity in minutes of the session if there is no activity in that session; so if you were not active for 120 minutes, for example, the session will be closed.
2. Expire_on_close, if set to true, allows you to delete the session if the user closes the browser.
3. If you use the native driver to keep the sessions (files), you can set the area where to keep the session files by setting another value for the files key.
4. Connection – if you want to use the ‘database’ or ‘redis’ session drivers, it allows you to set a specific set of parameters for the connection to the database.
5. If you want the table used for sessions to be named in a certain way, you can set the table name by adding a value to the table key.
6. Lottery is a kind of dice game through which Laravel decides what action of any user will delete old sessions.
7. Cookie is the name for the cookie to be used to store session data.
8. Domain is the cookie validity range.
9. Security determines whether cookies will only be used on a https connection.

About the author

Ilias spiros
By Ilias spiros

Recent Posts

Archives

Categories