Laravel 8.13 Out

The Laravel team released 8.13 this week and updated the change log detailing all the new features in last week's 8.12 release. New features added to Laravel in recent weeks have come with exciting updates, let's look at what's new!

8.12: Create Custom Observer

@StefanoDucciConvenia , make:observercommand ( # 34911 ) contributed to the ability to use stub.

8.12: 8.x Lazy Method in 8.x Eloquent Factory

Mathieu TUDISCO continue a model in the database when called the one who made me contributed to the ability to generate a callback. In earlier versions of Laravel, factorybuilder lazy()there was only one method that created the record when it was called. Now the 8.x factory can do the same thing:

$factory = User::factory()->lazy();
$factory = User::factory()->lazy(['name' => 'Example User']);

8.12: Encrypted String Eloquent Cast

Jason McCreary contributed to a meaningful cast that would allow a simple string to be encrypted and decrypted:

public $casts = [
'access_token' => 'encrypted',

8.12: New withColumn () to support Aggregation Functions

Halil   Laleh a contribution withColumna method to support more SQL aggregation functions, such as MinMaxSumAvgon relationships, etc.:

Post::withMax('comments', 'created_at');
Post::withMin('comments', 'created_at');
Post::withSum('comments', 'foo');
Post::withAvg('comments', 'foo');

You might want to check out #34965 for more details.

8.12: Add a Description to Eloquent / Query Builder

Illia Sakovichexplain() contributed to the query builder / meaningful constructor in a way that allows you to get the comment query from the constructor:

Webhook::where('event', 'users.registered')->explain()Webhook::where('event', 'users.registered')->explain()->dd()

now explain()to check in the description dd()and stop explaining.

8.12: Full PHP 8 Support

Dries Vints is working to add PHP 8 support to the Laravel ecosystem, including various libraries (both first and third-party libraries) and coordination of many efforts. Thanks to Dries and everyone interested in preparing Laravel for the next major PHP release!

8.12: Route Registration Method

Gregori Piñeres contributed to some methods that you can add to the route parameters:

// Before. This is still a valid, acceptable way of defining routes
'author' => '[0-9]+',
'book' => '[a-zA-Z]+'
// New optional syntax
// New methods support multiple args
->whereAlpha('author', 'book');

Release notes

Below is the full list of new features and updates on GitHub and you can see the difference between 8.11.0 and 8.12.0 to 8.12.0 and 8.13.0. 


KARABAY A, 2020 . Laravel 8.13 Out,

(Accessed November 10, 2020).

  Share this post

Comments (0)


Sign up for the email newsletter to be the first to know about my blog posts