title: Laravel eloquent UUID in a pivot table
body: <p>This question is like this one: <strong><a href="https://stackoverflow.com/questions/34997767/laravel-uuid-not-showing-in-query">laravel uuid not showing in query</a></strong>. However, the difference in this question is about that table is a pivot table with <code>id</code> field uses UUID generated via MySQL trigger on insert.</p>
  
  <p>I don't want to create another model for that pivot table to supply it with the solution regarded on the similar question's answer. So, is there any way to perform type casting of the pivot table from another model related to it?</p>