Skip to content

Commit d752fa6

Browse files
committed
Laravel rest api with passport
1 parent bba0d03 commit d752fa6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## **Laravel REST API with Passport**
22

33
In this, We will learn that how to work with REST API.
4-
We will use the in built functionality of laravel for authentication which call passport.
4+
We will use the in-built functionality of laravel for authentication which calls a passport.
55

6-
Laravel provides more security for APIs. So, its good to work on API with Laravel.
6+
Laravel provides more security for APIs. So, it's good to work on API with Laravel.
77

88
#### **What is REST API?**
99
Rest API (Representational State Transfer) api's are web standards base architecture and uses HTTP Protocol for exchanging data between applications or systems.
@@ -32,7 +32,7 @@ Go to your project path in terminal and run below command for passport authentic
3232

3333
composer require laravel/passport
3434

35-
After successfully install package, we require to get default migration for create new passport tables in our database. so let's run bellow command.
35+
After successfully installing the package, we are required to get default migration for creating new passport tables in our database. so let's run bellow command:
3636

3737
php artisan migrate
3838

@@ -137,7 +137,7 @@ Change config/auth.php file.
137137

138138
**4) Add Blog table and model**
139139

140-
Create migrtion file and model for Blog table by below command.
140+
Create migration file and model for Blog table by below command.
141141

142142
php artisan make:migration create_blogs_table
143143

@@ -207,7 +207,7 @@ Now open your database/migration/'your blog migration file'. and add your code h
207207
208208
**6) Create Controller files**
209209

210-
We will create two controller files. One for Register and another for Blogs by below comand.
210+
We will create two controller files. One for Register and another for Blogs by below command.
211211

212212
php artisan make:controller RegisterController
213213
@@ -438,7 +438,7 @@ Test Register API:
438438
![picture](img/register.png)
439439

440440
Let's test blog's CRUD. but before that, we need authentication to perform CRUD operation. because we used passport authentication.
441-
So, we will take access 'token' from register API's response. and add the token to each API's headers like below:
441+
So, we will access 'token' from register API's response. and add the token to each API's headers like below:
442442

443443
![picture](img/headers.png)
444444

0 commit comments

Comments
 (0)