![Generate PDF from HTML in Laravel 5.7](https://images.ctfassets.net/vzl5fkwyme3u/7BjL7ILSA84wgAUIo2K2yg/43ac850a592f4a272e910c30e06b97ba/AdobeStock_39841236.jpeg?w=1000)
Today, I will share with you how to create a PDF file from HTML blade file in Laravel 5.7. We will be using `dompdf` package for generating the PDF file.
In the below example, we will install `barryvdh/laravel-dompdf` using composer package and thereafter we will add new route url with controller. Then we will create a blade file. Then after we have to just run project with serve and we can check the PDF file is for download.
## Download Laravel 5.7
Now I am going to explain the step by step from scratch with laravel installation for `dompdf`. To get started, we need to download fresh Laravel 5.7 application using command, so open our terminal and run the below command in the command prompt:
composer create-project --prefer-dist laravel/lara...
![Install Composer for PHP](https://images.ctfassets.net/vzl5fkwyme3u/6REkTRobXqOMgyiyCa8ioS/fb4fc03a6a5514df3522a605b981505b/composer.png?w=1000)
Composer is a must-have tool for every PHP developer these days. This page is a simple breakdown of quick-install instructions.
## How do I install composer?
1. Use PHP to download the composer installer, place it in the current directory, and name it `composer-setup.php`
2. Use PHP to check the hash of the file you downloaded and compare it to the known value of the hash. You can always find the current value of the hash for the installer on the [Composer Public Keys / Signatures](https://composer.github.io/pubkeys.html) page.
3. Run the setup program to install composer. This does more than just download the latest copy of composer, it also sets up your local ~/.composer directory. This will install composer into the current directory. You can add the --install-dir=DIR to specify where you wan...
![How to install PHPUnit](https://images.ctfassets.net/vzl5fkwyme3u/3ekN0eVrp6IG48IQyYWgAe/12696dff66a9686b9ad5953643c18645/testing.png?w=1000)
PHPUnit is an essential tool for every PHP developers. It is one of those tools that every PHP developer should have installed in their development environment. The problems most first time PHPUnit developers run into are where to install it and how to install it. This quick guide will walk you through the process and answer both questions.
## How do I install PHPUnit
### The Easy Way
In your project’s root directory use this command.
`composer require --dev phpunit/phpunit ^6.0`
This command adds PHPUnit to your project as a development dependency. This is the absolute best way to install PHPUnit. It is the best way because this way the version of PHPUnit does not change unless you change it. We specified ^6.0 as the version which means we’ll get all the updates to the 6.0 ...
![Securing PHP RESTful APIs using Firebase JWT Library](https://images.ctfassets.net/vzl5fkwyme3u/4oaGx3XTrH7kq4KkQbQPQ6/87f8b47b39e42dfdd93e111aa4f91e9f/AdobeStock_191967596.png?w=1000)
In our [Last Blog Post](https://nomadphp.com/blog/69/create-simple-restful-apis-using-php-amp-mysql), we have created restful apis,But not worked on its security and authentication. Login api can be public but after login apis should be authenticate using any secure token. one of them is JWT, So i am providing the Steps for Create and use JWT Token in our already created API.
Now its time To Implement JWT Authentication IN our Api, So these are the steps to implement it in our already created Apis
### Step 1:Install and include Firebase JWT(JSON WEB TOKEN) in our project with following composer command
``` composer require firebase/php-jwt ```
include the composer insta...
![Creating a Tiny Blog Management system in Laravel 5.7](https://images.ctfassets.net/vzl5fkwyme3u/7hiPly9aeW8i6IU0wkK4Gg/5b13c5fb7f273be44f44c87fb2ce5f5f/AdobeStock_205314257.jpeg?w=1000)
I am expecting you are familiar with PHP. In this post I will be using the Laravel framework to create a small blog system. I am showing here very simple steps to create blogs, If you want this complete code then please message me.
**What are major Prequisites for Laravel:**
* PHP version >= 5.6
* Composer should be installed in system
Create a project with name tiny_blog with following command
```composer create-project laravel/laravel --prefer-dist tiny_blog```
enter into the laravel project
create a migration file using following artisan command
<pre>php artisan make:migration create_blog_table</pre>
After this command you will fou...