3.1.0
Added
- Attach related models to a model (check tests)
- Attach multiple related model to a model
- Attach extra information to the pivot
$response = $this->postJson('restify-api/companies/' . $company->id . '/attach/users', [
'users' => [1, 2],
'is_admin' => true,
])
->assertStatus(201);
$response->assertJsonFragment([
'company_id' => '1',
'user_id' => $user->id,
'is_admin' => true,
]);