35 lines
656 B
PHP
35 lines
656 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Shop;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Repositories\Core\PDF;
|
|
use App\Repositories\Shop\Invoices;
|
|
|
|
class InvoiceController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
//
|
|
}
|
|
|
|
public function show($uuid)
|
|
{
|
|
$data = Invoices::getByUUID($uuid);
|
|
|
|
return view('Shop.Invoices.show', $data);
|
|
}
|
|
|
|
public function pdf($uuid)
|
|
{
|
|
\Debugbar::disable();
|
|
|
|
$data = [
|
|
'invoice' => Invoices::getByUUID($uuid),
|
|
];
|
|
$filename = 'invoice-'.$uuid.'.pdf';
|
|
|
|
return PDF::view('Shop.Invoices.pdf', $data, $filename);
|
|
}
|
|
}
|