You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This API is created using Laravel 5.8 API Resource. It has Users, Posts and Comments. Protected routes are also added. Protected routes are accessed via Passport access token.
2
3
3
-
### API Authentication.
4
-
#### Installation
4
+
#### Following are the Models
5
+
* User
6
+
* Post
7
+
* Comment
5
8
6
-
## License
9
+
#### Usage
10
+
Clone the project via git clone or download the zip file.
7
11
8
-
The Laravel framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).
12
+
##### .env
13
+
Copy contents of .env.example file to .env file. Create a database and connect your database in .env file.
14
+
##### Composer Install
15
+
cd into the project directory via terminal and run the following command to install composer packages.
16
+
###### `composer install`
17
+
##### Generate Key
18
+
then run the following command to generate fresh key.
19
+
###### `php artisan key:generate`
20
+
##### Run Migration
21
+
then run the following command to create migrations in the databbase.
22
+
###### `php artisan migrate`
23
+
##### Passport Install
24
+
run the following command to install passport
25
+
###### `php artisan passport:install`
26
+
##### Make Auth System
27
+
then run the following command to generate the auth Scaffolding.
28
+
###### `php artisan make:auth`
29
+
##### Database Seeding
30
+
finally run the following command to seed the database with dummy content.
31
+
###### `php artisan db:seed`
32
+
33
+
### API EndPoints
34
+
##### User
35
+
* User GET `http://localhost:8000/api/v1/user`
36
+
##### Post
37
+
* Post GET All `http://localhost:8000/api/v1/posts`
38
+
* Post GET Single `http://localhost:8000/api/v1/posts/1`
39
+
* Post POST Create `http://localhost:8000/api/v1/posts`
40
+
* Post PUT Update `http://localhost:8000/api/v1/posts/1`
41
+
* Post DELETE destroy `http://localhost:8000/api/v1/posts/1`
0 commit comments