public function removeMember($id, $userId)
    {
        try {
            $result = $this->service->remove(Auth::user(), $id, $userId);

            if ($result) {
                return back()->with('message', 'Successfully removed member');
            }

            return back()->with('message', 'Failed to remove member');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
public function removeMember($id, $userId)
    {
        try {
            $result = $this->service->remove(Auth::user(), $id, $userId);

            if ($result) {
                return back()->with('message', 'Successfully removed member');
            }

            return back()->with('message', 'Failed to remove member');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
public function removeMember ( $ id , $ userId ) { try { $ result = $ this -> service -> remove ( Auth :: user ( ) , $ id , $ userId ) ; if ( $ result ) { return back ( ) -> with ( 'message' , 'Successfully removed member' ) ; } return back ( ) -> with ( 'message' , 'Failed to remove member' ) ; } catch ( Exception $ e ) { return back ( ) -> withErrors ( $ e -> getMessage ( ) ) ; } }
Remove a team member

@param  int  $userId
@return \Illuminate\Http\Response
Remove a team member