Home > Article > PHP Framework > Introduction to Laravel 7 new features and changes
The following is the tutorial column of Laravel to introduce you to the new features and changes of Laravel 7. I hope it will be helpful to friends in need!
Laravel 7 is a non-LTS version. Currently, only Laravel 6 and 5.5 are LTS versions.
Improving the performance of Laravel is a top priority. Laravel 7 claims to have improved the speed of Route Caching.
Taking the simplest Hello World as an example, the speed is increased by twice. However, it is a drop in the bucket.
It is actually an encapsulation of Guzzle. This is much more convenient. You no longer need to manually import Guzzle.
use Illuminate\Support\Facades\Http; $response = Http::post('url', [ 'name' => 'Laravel', ]); echo $response['foo']; $response->body() $response->json() $response->status()
I have no need for this yet, the built-in cast type already meets my needs.
An API authentication system designed for single-page applications and mobile APPs. A single user can generate multiple tokens at the same time.
It’s useless. Before Laravel can’t solve the performance problem, who will use Laravel to provide API services.
return (string) Str::of(' Laravel Framework 6.x ') ->trim() ->replace('6.x', '7.x') ->slug();
Overall, I still have no urge to upgrade Laravel 7, after all, it is a non-LTS version. Moreover, the current scenarios for using Laravel are mostly multiple web projects on one server, and upgrading many historical projects is of little significance.
The above is the detailed content of Introduction to Laravel 7 new features and changes. For more information, please follow other related articles on the PHP Chinese website!