mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-05 06:41:02 +00:00
refactor: adopt modular domain architecture (#747)
* refactor: stabilize model identities for domain migration * refactor: extract module platform context * refactor: assign models to domain contexts * refactor: extract ai platform context * refactor: extract storage platform context * refactor: extract mail platform context * refactor: extract pdf platform context * refactor: extract operations platform context * refactor: move installation into operations platform * refactor: extract money domain context * refactor: extract taxation domain context * refactor: extract catalog domain context * refactor: extract metadata domain context * refactor: extract reporting domain context * refactor: extract purchases domain context * refactor: extract receivables domain context * refactor: extract accounts domain context * refactor: complete reporting statement boundary * refactor: extract contacts domain context * refactor: extract sales domain context * refactor: remove legacy application layers * fix: migrate legacy bouncer role identities
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Platform\Pdf;
|
||||
|
||||
use App\Platform\Pdf\Application\PdfConfigurationService;
|
||||
use App\Platform\Pdf\Console\ComparePdfDriversCommand;
|
||||
use App\Platform\Pdf\Console\CreateTemplateCommand;
|
||||
use App\Platform\Pdf\Contracts\PdfConfigurator;
|
||||
use App\Platform\Pdf\Policies\PdfAccessPolicy;
|
||||
use App\Platform\Pdf\Rendering\PdfService;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class PdfServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind('pdf.driver', PdfService::class);
|
||||
$this->app->singleton(PdfConfigurationService::class);
|
||||
$this->app->bind(
|
||||
PdfConfigurator::class,
|
||||
fn (Application $app): PdfConfigurationService => $app->make(PdfConfigurationService::class),
|
||||
);
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
Gate::define('manage pdf config', [PdfAccessPolicy::class, 'manageConfiguration']);
|
||||
View::addNamespace('pdf_templates', storage_path('app/templates/pdf'));
|
||||
|
||||
$this->commands([
|
||||
ComparePdfDriversCommand::class,
|
||||
CreateTemplateCommand::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user