public function delete($lang, $id)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Permissions', 'delete')) {
            return $this->noPermission();
        }

        DB::statement('SET FOREIGN_KEY_CHECKS=0');
        $group = \App\Models\UserGroup::find($id)->delete();
        if($group) {
            DB::table('permissions')->where('groupID', $id)->delete();
            $result = $this->response('Group is deleted');
        }else{
            $result = $this->response('Internal server error. Please try again later', 500);
        }
        return $result;
    }