$staffGroup = StaffGroup::where('id', $id) ->with(['staffGroupRight' => function($query){ return $query->take(10); }]) ->first();
我假设您想拍摄10名staffGroupRight的记录.