<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\DB;

class ImagesAdminController extends Controller
{

    public function delete(Request $request)
    {
        $table = $request['pagina'];
        $coluna = $request['campo'];
        $id = $request['id'];
        DB::table($table)->where('id', $id)->update([$coluna => '']);
        $data = array("output" => true);
        echo json_encode($data);
        
    }
}
