Getting Started

Summary: Laravel 7 is now released and includes many new features.

Laravel 7 is now released and includes many new features including Laravel Airlock, better routing speed, custom Eloquent casts, Blade component tags, fluent string operations, a new HTTP client, CORS support, and many more features.

The new top features arrived with the Laravel 7 are the following:

  1. Laravel Airlock
  2. Zttp for Http Client
  3. Custom Eloquent Cast
  4. Blade Component Tags & Improvements
  5. Route caching speed improvements.

New Features In Laravel 7

1. Laravel Airlock

Laravel Airlock provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token-based APIs. The airlock allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities/scopes which specify which actions the tokens are allowed to perform.

2. Zttp For Http Client

Laravel now provides an expressive, minimal API around the Guzzle HTTP client, allowing you to quickly make outgoing HTTP requests to communicate with other web applications. Laravel’s wrapper around Guzzle is focused on its most common use cases and nice developer experience.

3. Custom Eloquent CastClasses

Laravel has a variety of built-in, helpful cast types; however, you may occasionally need to define your own cast types. You may now accomplish this by defining a class that implements the CastsAttributes interface.

Classes that implement this interface must define a get and set method. The get method is responsible for transforming a raw value from the database into a cast value, while the set method should transform a cast value into a raw value that can be stored in the database.

4. Blade Component Tags & Improvements

Blade components have been overhauled to allow tag-based rendering, attribute management, component classes, inline view components, and more. Since the overhaul of Blade components is so extensive, please consult the full Blade component documentation to learn about this feature.

5. Route Caching Speed Improvements

Laravel 7 includes a new method of matching compiled, cached routes that have been cached using the route: cache Artisan command. On large applications (for example, applications with 800 or more routes), these improvements can result in a 2x speed improvement in requests per second on a simple “Hello World” benchmark. No changes to your application are required.

Comments

Sign in to publish a comment

0 comments

Be the first to comment on this post.