Files
opensem/app/Http/Controllers/Shop/InvoiceController.php

34 lines
713 B
PHP

<?php
namespace App\Http\Controllers\Shop;
use App\Datatables\Shop\CustomerInvoicesDataTable;
use App\Repositories\Shop\InvoicePDF;
use App\Repositories\Shop\Invoices;
class InvoiceController extends Controller
{
public function index(CustomerInvoicesDataTable $dataTable)
{
return $dataTable->render('Shop.Invoices.partials.list');
}
public function view($uuid)
{
$data = [
'invoice' => Invoices::view($uuid),
];
return view('Shop.Invoices.view', $data);
}
public function pdf($uuid)
{
if (app()->bound('debugbar')) {
app('debugbar')->disable();
}
return InvoicePDF::getByUUID($uuid);
}
}