@darion
To display a PDF file in an iframe in Laravel, you can follow these steps:
1 2 3 4 5 |
Route::get('/pdf/{filename}', function ($filename) { $path = storage_path('app/' . $filename); return response()->file($path); }); |
1
|
<iframe src="{{ route('pdf', ['filename' => 'example.pdf']) }}" width="100%" height="600px"></iframe> |
Replace 'example.pdf' with the actual filename of your PDF file.
This is a basic example of how to display a PDF file in an iframe in Laravel. You can customize the code based on your specific requirements and use case.