feat(pdf): add DomPDF integration and ebook download feature
Integrate barryvdh/laravel-dompdf package for PDF generation with custom configuration. Add authenticated ebook download route and view. Update footer to display ebook download link for logged-in users.
This commit is contained in:
@@ -116,4 +116,12 @@ Route::post('/cookie-consent', [App\Http\Controllers\Legal\CookieConsentControll
|
||||
->middleware(['web'])
|
||||
->name('cookie.consent.store');
|
||||
|
||||
Route::get('ebook/download', function () {
|
||||
$path = public_path('ebooks/GPrompt-Ebook-Desenvolvedores-v1.pdf');
|
||||
if (!file_exists($path)) {
|
||||
abort(404, 'Ebook não encontrado');
|
||||
}
|
||||
return response()->file($path, ['Content-Type' => 'application/pdf']);
|
||||
})->name('ebook.download');
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
|
||||
Reference in New Issue
Block a user