Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/eliyas5044/laravel-api
- Owner: eliyas5044
- Created: 2017-01-11T10:40:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T06:32:22.000Z (over 1 year ago)
- Last Synced: 2024-04-14T12:33:50.619Z (6 months ago)
- Topics: laravel, laravel-api, laravel5, laravel57, laravel6, restful-api
- Language: PHP
- Homepage:
- Size: 1.44 MB
- Stars: 33
- Watchers: 5
- Forks: 14
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 !