<?php

use Illuminate\Support\Facades\Schema;
use Mtc\Core\Admin\Menu;

exit('You need to edit the file manually to run the uninstall');

$path='../../../';
$page_meta['title'] = 'Social Sharing Icons';

require_once $path .'core/includes/header.inc.php';

// Delete all settings created by plugin
Menu::query()
    ->where('constant', '=', 'SHARE_BUTTONS_INSTALLED')
    ->delete();
\MTC\Core\Setting::query()
    ->where('key', '=', 'SHARE_BUTTONS_INSTALLED')
    ->delete();
Schema::dropIfExists('share_buttons');

// Add a success message

require_once $path . 'core/admin/templates/adminheader.html.php';

echo 'Uninstalled successfully';

require_once $path . 'core/admin/templates/adminfooter.html.php';