4 months ago

Disable touches on firstOrCreate (laravel 5.5)

Posted 4 months ago by Toughoj

I've got two related models :

1-Answer (consists of 'answer_id' and 'text' attributes in addition to 'created_at' and 'updated_at')


AnswerBody model has:

protected $touches = ['Answer'];

I intend to create an AnswerBody without touching the related Answer in some cases. how do I disable touches on create() or firstOrCreate() on AnswerBody ?

Please sign in or create an account to participate in this conversation.