Home > Article > PHP Framework > The difference between laravel and tp5
Laravel framework: (Recommended learning: laravel development)
Lavavel has always adhered to the principle of elegance, which is very good It supports composer, achieves richer extensions, and has active community documentation. Compared with TP, Lavavel is larger and more secure. It is more suitable for developing large and medium-sized projects and is known as the "master development framework".
Laravel already has an 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.
ThinkPHP framework:
ThinkPHP was born to simplify enterprise-level application development and agile WEB application development. It was first born in early 2006, and was officially renamed ThinkPHP on New Year's Day 2007, and was released under the Apache2 open source agreement.
ThinkPHP has been adhering to the simple and practical design principle since its birth. While maintaining excellent performance and minimal code, it also focuses on ease of use. And it has many original functions and features. With the active participation of the community team, it is continuously optimized and improved in terms of ease of use, scalability and performance.
The difference between laravel and tp5
Laravel will have csrf cross-site request forgery verification when the form is submitted, but Tp5 does not.
Laravel needs to define the route first when requesting. Tp5 does not need to be defined. It can be accessed with pathinfo route.
Laravel will have middleware before the request, and Tp5 will have pre-operations and hooks.
How to submit data, Laravel needs to add @csrf or {{ csrf_token() }} to the form when submitting the form to prevent cross-domain attacks, but TP does not.
The above is the detailed content of The difference between laravel and tp5. For more information, please follow other related articles on the PHP Chinese website!