How to Display PDF file in Laravel From Public Folder -

Steps to display PDF file in laravel

//for displaying PDF Route::get('/display_pdf','PdfController@index');
php artisan make:controller PdfController
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use File;
use Response;
class PdfController extends Controller {
public function index(){
return Response::make(file_get_contents('images/image1.pdf'), 200, [ 'content-type'=>'application/pdf', ]);



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Hi, This is Biplab and I am web developer well versed in PHP and other open source technologies. I am here to share my experience with the community.