-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
How I can add pivot values to attach action?
public function attachCollectionItems(
UserSchema $schema,
UserRequest $request,
User $user
) {
$collectionItems = $schema
->repository()
->modifyToMany($user, 'collection-items')
->attach($request->validatedForRelation(), ['status' => 1]);
}
The problem is that attach() is not native laravel method. I cannot add pivot values there.
Is there a way to to do that using that package or i'll have to write this method myself completely?
Metadata
Metadata
Assignees
Labels
No labels