Laravel 7.15 Out

The Laravel team released v7.15.0 with a test assistant, a new model method, to define relationships between models.

Extensible Relationships for Models

Gergő D. NagyresolveRelationUsing is a method for defining relationships between models outside of model class definitions addDi:

Order::resolveRelationUsing('customer', function ($model) {
return $model->belongsTo(Customer::class, 'customer_id');

WithToken () Test Assistant

Aryeh RaberwithToken() Contributed to the HTTP test assistant:

Using withHeader
$response = $this->withHeader('Authorization', 'Bearer test_token')->postJson('/some-endpoint');
The new withToken() helper
$response = $this->withToken('test_token')->postJson('/some-endpoint');

Foreign UUID

Paul AdamsforeignUuid() contributed to the definition of a column for UUID foreign keys. Here are some examples of the tests for the pick request:


Release notes

Below you can see the full list of new features and updates and the difference between 7.14.0 and 7.15.0 on GitHub.



  • Added expandable relationships for models ( #33025 )
  • Illuminate\Foundation\Testing\Concerns\MakesHttpRequests::withToken()# 33075 , 79383a1 )
  • Illuminate\Database\Eloquent\Relations\HasOneOrMany::makeMany()(creating a large number without saving) ( # 33021 )
  • Illuminate\Database\Schema\Blueprint::foreignUuid()# 33129 )
  • Event handler queue viaQueue()method ( # 32770 , 852a927 )


  • Model::withoutEvents()Fixed an issue where listeners were booted and not saved in () ( # 33149 , 4bb32ae )


KARABAY A, 2020 . Laravel 7.15 Out,

(Accessed June 11, 2020).

  Share this post

Comments (0)


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