Comments & Discussion
MJ
Hi there! I have tried this on a "normal" haveMany/belongsTo relationship, lets say Post has many Comment and it works fine, but when the relationship is a Morph relationship (using model_id and model_type fields), it doesnt seem to work... documentation doesnt say anything about touching timestamps in morph relationships. I solved that "manually" with model events but i dont know if iI'm missing something when trying to touch timestamps in a morph. how do you indicate the parent model? protected $touches = ['model']
Thanks! This concept has become more important to me when I have been indexing data using scout to rebuild the document