Laravel 7 has released on 3rd March 2020. This is not LTS version so according to Laravel version support policy, they will provide 6-month bug fix until 3 September 2020. The big news is Laravel will release a new major version every 6 months.
Here you can see what new features you are getting in Laravel 7…
Laravel Airlock
Better routing speed
Blade component tags
Fluent string operations
A new HTTP client
New artisan commands
Multiple Mail driver
CORS support
Laravel Airlock
It is mainly built by Taylor Otwell. Laravel Airlock provides an easy authentication system for mobile applications, single-page applications and simple token-based APIs applications. It will allow each and every user of your application to generate multiple API tokens for their account. All these tokens may be granted abilities which specify which actions the tokens are allowed to perform.
For more information on Laravel Airlock, consult the Airlock documentation.
Better Routing Speed
Laravel 7 will give 2x faster speed than Laravel 6 using route:cache. One more best feature is defined as Route Model binding. Using this feature you can bind your Model in your route.
Route::get('users/{user:slug}', function (App\User $user) {
return $user;
});
For more information on route model binding, please consult the routing documentation.
Blade Component Tags
Laravel 7 allows you to define your own components and use them in your blade files like below:
Define Component
namespace App\View\Components;
use Illuminate\View\Component;
class Notify extends Component
{
public $type;
public function __construct($type)
{
$this->type = $type;
}
public function classForType()
{
return $this->type == 'success' ? 'notify-success' : 'notify-warning';
}
public function render()
{
return view('components.notify');
}
}
Make Component Tag
<div class="notify {{ $classForType() }}">
{{ $heading }}{{ $slot }}
</div>
Using it in Blade Files
<x-notify type="error" class="mb-4">
<x-slot name="heading">
Alert content...
</x-slot>
Default slot content...
<x-notify>
Please consult the full Blade component documentation to learn about this feature.
Explore all the new features at Laravel 7 Released…