Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b7da9ab

Browse filesBrowse files
update readme.md file with application usage
1 parent 0c7005d commit b7da9ab
Copy full SHA for b7da9ab

File tree

Expand file treeCollapse file tree

1 file changed

+39
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+39
-4
lines changed

‎readme.md

Copy file name to clipboard
+39-4Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,43 @@
11
# Laravel 5.8 REST APi
2+
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.
23

3-
### API Authentication.
4-
#### Installation
4+
#### Following are the Models
5+
* User
6+
* Post
7+
* Comment
58

6-
## License
9+
#### Usage
10+
Clone the project via git clone or download the zip file.
711

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`
42+
43+
Same For Comments.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.