app/Http/Controllers/GroupUserController.php
/**
     * Cancel invitation
     *
     * @param GroupUser $groupUser
     * @return mixed
     */
Cancel invitation
@param GroupUser $groupUser
@return mixed
Cancel invitation @param GroupUser $groupUser @return mixed
public function cancel(GroupUser $groupUser)
    {
        $this->authorize($groupUser);
        if ($groupUser->status !== 'invite') {
            return redirect()->back()->withErrors(trans('groups.no-invitation-user'));
        }
        $groupUser->delete();
        return redirect()->back()->with('success', trans('groups.invitation-canceled'));
    }
public function cancel ( GroupUser $ groupUser ) { $ this -> authorize ( $ groupUser ) ; if ( $ groupUser -> status !== 'invite' ) { return redirect ( ) -> back ( ) -> withErrors ( trans ( 'groups.no-invitation-user' ) ) ; } $ groupUser -> delete ( ) ; return redirect ( ) -> back ( ) -> with ( 'success' , trans ( 'groups.invitation-canceled' ) ) ; }
Cancel invitation
 @param GroupUser $groupUser
 @return mixed
Cancel invitation @param GroupUser $groupUser @return mixed