Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eliyas5044/laravel-api

This is a simple RESTful api where laravel version is 6
https://github.com/eliyas5044/laravel-api

laravel laravel-api laravel5 laravel57 laravel6 restful-api

Last synced: 2 days ago
JSON representation

This is a simple RESTful api where laravel version is 6

Awesome Lists containing this project

README

        


Build Status
Total Downloads
Latest Stable Version
License

# laravel-api
- First clone via `git bash` or download it. It is a RESTful api, you will find `angular` app [angular-laravel](https://github.com/eliyas5044/angular-laravel) .

- Create your database with name `laravel_api`, you may change later.

- After creating database, run this command in your terminal
```
make init
```

- Run this command to live your RESTful api
```
php artisan serve
```

- You can check via [postman](https://www.getpostman.com/apps). All books routes are protected by `auth:api` middleware, so you have to register or login to navigate those uri's.

## All end points
### user routes
1. `http://localhost:8000/api/register`
2. `http://localhost:8000/api/login`
3. `http://localhost:8000/api/logout`
4. `http://localhost:8000/api/me`
5. `http://localhost:8000/api/refresh`

### book routes
1. Method `GET`, `URI` - `http://localhost:8000/api/book`
2. Method `POST`, `URI` - `http://localhost:8000/api/book`
3. Method `PUT`, `URI` - `http://localhost:8000/api/book/{id}`
4. Method `DELETE`, `URI` - `http://localhost:8000/api/book/{id}`

- Clone or download [angular](https://github.com/eliyas5044/angular-laravel) and run this app. You will see data will load from this server to your `angluar` app.

## Enjoy !