pdf_path) && Storage::disk('local')->exists($legacyInvoice->pdf_path)) { return response()->file(Storage::disk('local')->path($legacyInvoice->pdf_path), [ 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline; filename="'.$renderer->filename($legacyInvoice).'"', 'Cache-Control' => 'private, max-age=0, must-revalidate', ]); } if (Schema::hasColumn('legacy_invoices', 'pdf_generated_at')) { $legacyInvoice->forceFill(['pdf_generated_at' => now()])->save(); } return $renderer->inlineResponse($legacyInvoice); } }