mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-01 12:51:00 +00:00
25 lines
650 B
PHP
25 lines
650 B
PHP
<?php
|
|
|
|
namespace App\Domains\Sales\Http\Controllers\Company;
|
|
|
|
use App\Domains\Sales\Models\Estimate;
|
|
use App\Platform\Http\Controller;
|
|
use App\Platform\Pdf\Rendering\PdfTemplateUtils;
|
|
use Illuminate\Http\Request;
|
|
|
|
class EstimateTemplatesController extends Controller
|
|
{
|
|
/**
|
|
* List the PDF templates an estimate can be rendered with, each already
|
|
* paired with its preview image.
|
|
*/
|
|
public function __invoke(Request $request)
|
|
{
|
|
$this->authorize('viewAny', Estimate::class);
|
|
|
|
return response()->json([
|
|
'estimateTemplates' => PdfTemplateUtils::getFormattedTemplates('estimate'),
|
|
]);
|
|
}
|
|
}
|