title: how to use groupBy in hasMany relation in Laravel
body: <p>I have 2 tables that are named Resort and booking. in the booking table, there is a field named amount. I want to join these tables using with hasMany relation and get sum of the amount field in the booking table using with groupBy. can you please help me to solve this problem?</p>
  <p>Thanks in Advance</p>