laravel eloquent: Get all groups for a member

Solution:

Please use this below query:

 App/User::where('id',auth()->user()->id)->with('members.groups')->get();