Skip to content

Increment\Decrement with other attributes. #55672

Answered by macropay-solutions
mrFANRA asked this question in Q&A
Discussion options

You must be logged in to vote

You need to use

$book->increment('some_value', extra: ['full_name' => $book->full_name]);

or

$book->increment('some_value', extra: ['full_name' => Str::random()]);

or

$book->increment('some_value', extra: $book->getDirty());

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@macropay-solutions
Comment options

Answer selected by mrFANRA
@mrFANRA
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants