I have an expenses table, that has a belongsTo relation with Descriptions. I simply want to return the description instance that was used the most. What my thoughts are, is to grab the description_id that was used the most, then grab the corresponding Description from the database using the id. So far I came up with this:
auth()->user()->expenses()->get()->groupBy('description_id');
So this gives me the results grouped by description_id. Unsure if I'm on the right track, but not sure where to go from here. Or if there is a more appropriate way to accomplish this. Anything that can lead me into the right direction will be appreciated.