Home  >  Article  >  PHP Framework  >  What technologies does laravel have?

What technologies does laravel have?

青灯夜游
青灯夜游Original
2021-09-24 15:43:591657browse

Functional technologies in laravel: 1. Bundle; 2. Eloquent ORM; 3. Application logic; 5. Restful controller; 6. Automatic loading class; 7. View assembler; 8. Reverse control container ; 9. Migration, "Artisan" command line tool; 10. Unit testing; 11. Automatic paging, etc.

What technologies does laravel have?

The operating environment of this tutorial: Windows 7 system, Laravel version 5, Dell G3 computer.

What technology does laravel have? Technical features

1. Bundle is the organization form or name of Laravel’s expansion package. Laravel's extension package repository is quite mature and can easily help you install extension packages (bundles) into your application. You can choose to download an extension package (bundle) and copy it to the bundles directory, or install it automatically through the command line tool "Artisan".

2. Laravel already has a set of advanced PHP ActiveRecord implementation -- Eloquent ORM. It can easily apply "constraints" to both sides of the relationship, so that you have complete control over the data and enjoy all the conveniences of ActiveRecord. Eloquent natively supports all methods of the query builder (query-builder) in Fluent.

3. Application logic can be implemented in controllers or directly integrated into route statements, and the syntax is similar to the Sinatra framework. Laravel's design philosophy is to give developers maximum flexibility, allowing them to create very small websites and build large-scale enterprise applications.

4. Reverse Routing gives you the ability to create links (URIs) through route names. Just use the route name and Laravel will automatically create the correct URI for you. This way you can change your routes at any time, and Laravel will automatically update all related links for you.

5. Restful Controllers are an optional way to distinguish between GET and POST request logic. For example, in a user login logic, you declare a get_login() action to process the service of obtaining the login page; you also declare a post_login() action to verify the data POSTed from the form, and After validation, a decision is made to redirect to the login page or to the console.

6. Class Auto-loading simplifies the loading of classes. In the future, you no longer need to maintain the auto-loading configuration table and unnecessary component loading. When you want to load any library or model, just use it immediately, and Laravel will automatically load the required files for you.

7. View Composers are essentially a piece of code that will be automatically executed when the View is loaded. The best example is the random article recommendation on the side of the blog. The "view assembler" contains the logic for loading the random article recommendation. In this way, you only need to load the view of the content area, and Laravel will do the other things. Complete it automatically for you.

8. The reverse control container (IoC container) provides a convenient way to generate new objects, instantiate objects at any time, and access singleton objects. Inverse Control (IoC) means that you almost don't need to load external libraries (libraries), you can access these objects anywhere in the code, and you don't need to endure complicated and redundant code structures.

9. Migrations is like a version control tool, but it manages the database paradigm and is directly integrated into Laravel. You can use the "Artisan" command line tool to generate and execute "migration" instructions. When your team members change the database paradigm, you can easily update the current project through the version control tool, and then execute the "migrate" command. Well, your database is already up to date!

10. Unit-Testing is a very important part of Laravel. Laravel itself contains hundreds of test cases to ensure that any modification will not affect the functionality of other parts. This is one of the reasons why Laravel is considered the most stable version in the industry. Laravel also provides convenient functions to make unit testing your own code easy. All test cases can be run through the Artisan command line tool.

11. The Automatic Pagination function avoids mixing a large amount of irrelevant paging configuration code into your business logic. The convenience is that you don't need to remember the current page, just get the total number of entries from the database, then use limit/offset to get the selected data, and finally call the 'paginate' method to let Laravel output the links of each page to the specified view ( View), Laravel will automatically complete all the work for you. Laravel's automatic paging system is designed to be easy to implement and easy to modify. Although Laravel can handle these tasks automatically, don't forget to call the corresponding methods and manually configure the paging system!

Related recommendations: The latest five Laravel video tutorials

The above is the detailed content of What technologies does laravel have?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn