Refactor Custom Invoice/Estimate PDF Templates (#277)

* Add utility class for managing templates

* Register custom pdf template views location

* Update the make:template command to make use of PdfTemplateUtils

* Update PDF invoice/estimate template controllers

* Register pdf_templates filesystem disk

* Remove unused leftovers

* Reformat with pint
This commit is contained in:
Darko Gjorgjijoski
2025-01-13 01:20:13 +01:00
committed by GitHub
parent 12d9d6c801
commit d862ee05e9
11 changed files with 221 additions and 53 deletions

View File

@@ -25,6 +25,7 @@ use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
use Silber\Bouncer\Database\Models as BouncerModels;
use Silber\Bouncer\Database\Role;
use View;
class AppServiceProvider extends ServiceProvider
{
@@ -58,6 +59,8 @@ class AppServiceProvider extends ServiceProvider
Gate::policy(Role::class, RolePolicy::class);
View::addNamespace('pdf_templates', storage_path('app/templates/pdf'));
$this->bootAuth();
$this->bootBroadcast();