public function index()
    {
        $invitations = MemberInvitation::with(
            'member',
            'member.user',
            'inviter',
            'inviter.user'
        )
            ->active()
            ->forUserContext($this->userContext())
            ->orderBy('created_at', 'desc')
            ->paginate(config('app.pagination_default'));
        return fractal($invitations, new MemberInvitationTransformer())
            ->withResourceName('memberInvitation')
            ->respond();
    }
public function index()
    {
        $invitations = MemberInvitation::with(
            'member',
            'member.user',
            'inviter',
            'inviter.user'
        )
            ->active()
            ->forUserContext($this->userContext())
            ->orderBy('created_at', 'desc')
            ->paginate(config('app.pagination_default'));
        return fractal($invitations, new MemberInvitationTransformer())
            ->withResourceName('memberInvitation')
            ->respond();
    }
public function index ( ) { $ invitations = MemberInvitation :: with ( 'member' , 'member.user' , 'inviter' , 'inviter.user' ) -> active ( ) -> forUserContext ( $ this -> userContext ( ) ) -> orderBy ( 'created_at' , 'desc' ) -> paginate ( config ( 'app.pagination_default' ) ) ; return fractal ( $ invitations , new MemberInvitationTransformer ( ) ) -> withResourceName ( 'memberInvitation' ) -> respond ( ) ; }
Fetch a paginated list of Invitations for a selected Team

@return \Illuminate\Http\Response JSON object with pagination header member$members and data array with a list
of Invitation objects
Fetch a paginated list of Invitations for a selected Team