cosmetic fixes, enhance profile, fix mails, ...
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use App\Repositories\Core\PDF;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
@@ -15,9 +16,21 @@ class InvoiceController extends Controller
|
||||
//
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
public function show($uuid)
|
||||
{
|
||||
$data = Invoices::get($id);
|
||||
$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';
|
||||
$html = view('Shop.Invoices.pdf', $data)->toHtml();
|
||||
// $html = '<h1>Hello world!</h1>';
|
||||
// return PDF::convertHTML($html);
|
||||
// return view('Shop.Invoices.pdf', $data);
|
||||
return PDF::view('Shop.Invoices.pdf', $data, $filename);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user