public function inviteMember(UserInviteRequest $request, $id)
    {
        try {
            $result = $this->service->invite(Auth::user(), $id, $request->email);

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

            return back()->with('message', 'Failed to invite member - they may already be a member');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
public function inviteMember(UserInviteRequest $request, $id)
    {
        try {
            $result = $this->service->invite(Auth::user(), $id, $request->email);

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

            return back()->with('message', 'Failed to invite member - they may already be a member');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
public function inviteMember ( UserInviteRequest $ request , $ id ) { try { $ result = $ this -> service -> invite ( Auth :: user ( ) , $ id , $ request -> email ) ; if ( $ result ) { return back ( ) -> with ( 'message' , 'Successfully invited member' ) ; } return back ( ) -> with ( 'message' , 'Failed to invite member - they may already be a member' ) ; } catch ( Exception $ e ) { return back ( ) -> withErrors ( $ e -> getMessage ( ) ) ; } }
Invite a team member

@param  int  $id
@return \Illuminate\Http\Response
Invite a team member