7.30.1

Latest release in branch 7.0
Released 5 years ago (October 31, 2020)

Software Laravel
Branch 7.0
Status
End of life
End of bug fixes September 10, 2020
End of security fixes March 03, 2021
First official release version 7.0.0
First official release date 6 years ago (March 02, 2020)
Supported
PHP versions
PHP 7.2 - 8.0
Release notes https://github.com/laravel/laravel/releases/tag/v7.30.1
Source code https://github.com/laravel/laravel/tree/v7.30.1
Documentation https://laravel.com/docs
Download https://laravel.com/docs/master/installation
Laravel 7.0 Releases View full list

What Is New in Laravel 7.0

Laravel 7 introduces a suite of new features and improvements focused on developer experience, application structure, and modern web development practices.

Category Key Changes
New Features Laravel Airlock, Custom Eloquent Casts, Blade Component Tags, HTTP Client, Fluent String Operations, Route Model Binding Improvements
Improvements CORS Support, Multiple Mail Drivers, Query Time Casts, Artisan test Command, Markdown Mail Template Updates
Deprecations Various default package references and helpers

How does Laravel 7 improve API authentication?

Laravel 7 introduces Airlock, a lightweight API authentication package designed for SPAs and mobile applications. It provides a simple way to issue API tokens without the complexity of OAuth. This is a game-changer for projects that need a straightforward token-based authentication system.

In practice, Airlock allows each user to have multiple API tokens. You can define abilities for these tokens, similar to OAuth scopes, giving you fine-grained control over permissions. It matters because it simplifies what used to require a separate package or a custom implementation.

What are the new Blade component features?

Blade components get a significant upgrade with component tags and view-based components. You can now use HTML-like tags to render components, making your templates much cleaner and more intuitive.

For example, instead of @component('alert'), you can write <x-alert>. You can also pass data via attributes and even use slots for content. This change makes Blade templates feel more modern and aligns them with other popular component-based systems.

How does custom Eloquent casting work?

You can now define your own custom cast types for Eloquent attributes. This allows you to encapsulate the logic for converting data between its database storage format and its application representation.

To create a custom caster, implement the CastsAttributes interface. This is powerful for handling complex data types like collections, objects, or even encrypted values directly within your model, keeping your code DRY and organized.

What is new with the HTTP Client?

Laravel 7 includes a expressive HTTP client built on top of Guzzle. It provides a fluent, test-friendly interface for making outgoing HTTP requests to other web services.

The client supports various operations like GET, POST, and PUT with easy JSON data handling. It also includes built-in support for faking responses in your tests, which streamlines the process of testing code that interacts with external APIs.

What are Fluent String Operations?

This feature provides a more object-oriented, fluent interface for working with string values. It's a collection of methods for common string manipulations, all chainable for readability.

You start by wrapping a string with Str::of() and then chain methods like after(), before(), replace(), and trim(). It makes string processing code much easier to write and read compared to using a series of native PHP functions.

FAQ

Is Laravel Airlock a replacement for Passport?
No, they serve different purposes. Airlock is designed for simple, first-party API token authentication (e.g., for your own SPA). Passport is a full OAuth2 server implementation for authenticating third-party clients.

Do I have to use the new Blade component tags?
No, the old @component syntax is still fully supported. The new tag syntax is optional but recommended for its cleaner syntax.

How do I start using the new HTTP Client?
You can use it via the Http facade. For example: Http::get('https://api.example.com')->json(). It's available without any additional installation.

What is the advantage of custom Eloquent casts?
They centralize the logic for data transformation. If you need to change how an attribute is formatted or stored, you only need to update the custom cast class instead of searching through multiple models.

Are there any breaking changes in Laravel 7?
The upgrade is designed to be straightforward for most applications. The main changes involve updating some package dependencies and being aware of a few deprecated helpers. Always check the upgrade guide for specifics.

Releases In Branch 7.0

Version Release date
7.30.1 5 years ago
(October 31, 2020)
7.30.0 5 years ago
(October 30, 2020)
7.29.0 5 years ago
(October 29, 2020)
7.28.0 5 years ago
(September 08, 2020)
7.25.0 5 years ago
(August 11, 2020)
7.12.0 5 years ago
(May 18, 2020)
7.6.0 6 years ago
(April 15, 2020)
7.3.0 6 years ago
(March 24, 2020)
7.0.0 6 years ago
(March 02, 2020)