app/Http/Controllers/GroupUserController.php
/**
     * Remove user from group
     *
     * @param GroupUser $groupUser
     * @return \Illuminate\Http\RedirectResponse
     */
Remove user from group
@param GroupUser $groupUser
@return \Illuminate\Http\RedirectResponse
Remove user from group @param GroupUser $groupUser @return \ Illuminate \ Http \ RedirectResponse
public function remove(GroupUser $groupUser)
    {
        $this->authorize($groupUser);
        if ($groupUser->type === 'admin') {
            return redirect()->back()->withErrors(trans('groups.cant-remove-admin'));
        }
        $groupUser->delete();
        return redirect()->back()->with('success', trans('groups.user-removed'));
    }
public function remove ( GroupUser $ groupUser ) { $ this -> authorize ( $ groupUser ) ; if ( $ groupUser -> type === 'admin' ) { return redirect ( ) -> back ( ) -> withErrors ( trans ( 'groups.cant-remove-admin' ) ) ; } $ groupUser -> delete ( ) ; return redirect ( ) -> back ( ) -> with ( 'success' , trans ( 'groups.user-removed' ) ) ; }
Remove user from group
 @param GroupUser $groupUser
 @return \Illuminate\Http\RedirectResponse
Remove user from group @param GroupUser $groupUser @return \ Illuminate \ Http \ RedirectResponse