public function destroy($id)
    {
        $extension = $this->repository->findOrFail($id);
        if ($extension->protected) {
            return $this->notifyError(trans('cms::extension.protected'));
        }

        if ($this->repository->uninstall($id)) {
            flash()->success(trans('cms::extension.deleted', compact('id')));
        } else {
            flash()->error(trans('cms::extension.error', compact('id')));
        }

        return back();
    }
public function destroy($id)
    {
        $extension = $this->repository->findOrFail($id);
        if ($extension->protected) {
            return $this->notifyError(trans('cms::extension.protected'));
        }

        if ($this->repository->uninstall($id)) {
            flash()->success(trans('cms::extension.deleted', compact('id')));
        } else {
            flash()->error(trans('cms::extension.error', compact('id')));
        }

        return back();
    }
public function destroy ( $ id ) { $ extension = $ this -> repository -> findOrFail ( $ id ) ; if ( $ extension -> protected ) { return $ this -> notifyError ( trans ( 'cms::extension.protected' ) ) ; } if ( $ this -> repository -> uninstall ( $ id ) ) { flash ( ) -> success ( trans ( 'cms::extension.deleted' , compact ( 'id' ) ) ) ; } else { flash ( ) -> error ( trans ( 'cms::extension.error' , compact ( 'id' ) ) ) ; } return back ( ) ; }
Uninstall an extension.

@param string $id
@return \Illuminate\Http\RedirectResponse
Uninstall an extension .