+++fix: add thumbnail support for territori
This commit is contained in:
@@ -7,6 +7,7 @@ use Livewire\WithFileUploads;
|
||||
use App\Models\Territorio;
|
||||
use App\Models\Zona;
|
||||
use App\Models\Tipologia;
|
||||
use App\Services\TerritorioThumbnailService;
|
||||
|
||||
class TerritorioCreate extends Component
|
||||
{
|
||||
@@ -48,7 +49,9 @@ class TerritorioCreate extends Component
|
||||
];
|
||||
|
||||
if ($this->pdf) {
|
||||
$data['pdf_path'] = $this->pdf->store('territori-pdf', 'public');
|
||||
$pdfPath = $this->pdf->store('territori-pdf', 'public');
|
||||
$data['pdf_path'] = $pdfPath;
|
||||
$data['thumbnail_path'] = app(TerritorioThumbnailService::class)->generate($pdfPath);
|
||||
}
|
||||
|
||||
$territorio = Territorio::create($data);
|
||||
|
||||
Reference in New Issue
Block a user