Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/escape-dev/practice-laravel-api

Practice REST API and JWT using laravel
https://github.com/escape-dev/practice-laravel-api

jwt laravel mysql php

Last synced: about 1 month ago
JSON representation

Practice REST API and JWT using laravel

Awesome Lists containing this project

README

        

# Project kali ini adalah latihan saya dalam membuat RESTful API
pembuatan RESTful API ini menggunakan bahasa pemrogramman php dan menggunakan framework laravel dengan database mysql.

## Endpoints
note: jangan lupa menambahkan ```Accept => application/json``` di header
### Contacts
* Get all contacts : ``` GET /api/contacts ```
* Post a contacts : ``` POST /api/contacts ```
* Update a contacts : ``` PUT /api/contacts/{id} ```
* Delete a contacts : ``` DELETE /api/contacts/{id} ```

### Authentication
* sign up : ``` POST /api/register ```
* sign in : ``` POST /api/signin ```
* sign out : ``` DELETE /api/signout ```

### Somewhat usefull method

- unique validation for create or update
``` 'phone' => ['required', 'numeric', 'digits_between:10,15', Rule::unique('contacts')->ignore($this->contact)] ```