![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...
![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...
![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...
![Making Charts and Graphs using Laravel](https://images.ctfassets.net/vzl5fkwyme3u/5BTS4j0szSISc42GiMM64C/4261e509221448298776024a6f6629cd/AdobeStock_203669380.jpeg?w=1000)
## Installing composer
Composer is a package management tool for PHP. Laravel requires composer for installation. We can download composer from [https://getcomposer.org/download/](https://getcomposer.org/download/)
After installation that you can test whether composer installed or not by command
## Installing Laravel
The current stable version of laravel is laravel 5.6. We can install laravel package with three ways.
In command prompt or terminal by running `composer global require "laravel/installer"` and then `Laravel new
We can create the project with Composer by running `composer create-project --prefer-dist laravel/laravel
![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...