We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
When I do the "normal" ->detach($post->id) I get as expected the timestamp at the deleted_at column.
->detach($post->id)
deleted_at
But when I'd like to set the reassignment again by using ->attach() like:
->attach()
$user->managedPosts()->attach( [ $post->id => [ 'relationship_type' => $pivotFields['relationship_type'], 'role_id' => $pivotFields['role_id'], ], ] );
unfortunately the value of deleted_at is not changed to NULL and actually the assignment is still deleted.
NULL
I saw in the documentation about $post->tags()->restore([$tag->id]); and I tried:
$post->tags()->restore([$tag->id]);
$user->managedPosts()->restore( [ $post->id => [ 'relationship_type' => $pivotFields['relationship_type'], 'role_id' => $pivotFields['role_id'], ], ] );
but with no success.
IMHO using the standard Laravel method ->attach() should reactivate the assignment by removing the timestamp from deleted_at
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
When I do the "normal"
->detach($post->id)
I get as expected the timestamp at thedeleted_at
column.But when I'd like to set the reassignment again by using
->attach()
like:unfortunately the value of
deleted_at
is not changed toNULL
and actually the assignment is still deleted.I saw in the documentation about
$post->tags()->restore([$tag->id]);
and I tried:but with no success.
IMHO using the standard Laravel method
->attach()
should reactivate the assignment by removing the timestamp fromdeleted_at
The text was updated successfully, but these errors were encountered: