<?php

namespace App\Http\Controllers\Admin\Shop;

use App\Datatables\Admin\Shop\CustomerOrdersDataTable;
use App\Repositories\Shop\Orders;

class CustomerOrderController extends Controller
{
    public function index(CustomerOrdersDataTable $dataTable)
    {
        return $dataTable->render('Admin.Shop.CustomerOrders.list');
    }

    public function show($id)
    {
        $data = [
            'order' => Orders::get($id),
        ];

        return view('Admin.Shop.CustomerOrders.view', $data);
    }

    public function destroy($id)
    {
        return Orders::destroy($id);
    }
}
