<?php

namespace Modules\Cart\Http\Controllers;

use App\Http\Controllers\BasicController;
use Illuminate\Http\Request;
use Modules\Cart\Entities\Model;

class WebController extends BasicController
{
    public function index(Request $request)
    {
        $Models = Model::with('Client', 'Product')->whereHas('Product')->latest()->get();

        return view('cart::index', compact('Models'));
    }

    public function destroy($id)
    {
        $Model = Model::where('id', $id)->delete();
    }
}
