Step:1
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/06/1-1.png)
Step:II make controller
php artisan make:controller PdfController
Step:III Install Package
composer require barryvdh/laravel-dompdf
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/06/composer.png)
Step:IV open your config/app.php put this code after Providers
Barryvdh\DomPDF\ServiceProvider::class,
Step:V open your config/app.php put this code after aliases
‘PDF’ => Barryvdh\DomPDF\Facade::class,
Step:VI Write this code in the PdfController
Step:VII resources/view/welcome.php
open welcome.php page and paste this code.
Step:VIII route/web.php
open this web.php and paste this code
Route::get(‘pdfconveter’,’PdfController@againpdf’);
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/06/web-2-1024x247.png)
Step:IX– run this command
php artisan serve
Step:X write this url in the browser. http://127.0.0.1:8000/
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/06/welcome-1024x535.png)
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
- AJAX Crud with laravel 5.8 - October 29, 2021
- Upload image in the database with local folder and image send mail. - October 23, 2020
- How to protect .env file in Laravel. - September 10, 2020