Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/escape-dev/practice-laravel-api
- Owner: escape-dev
- Created: 2022-05-29T08:08:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T05:49:28.000Z (about 2 months ago)
- Last Synced: 2024-11-25T06:27:02.406Z (about 2 months ago)
- Topics: jwt, laravel, mysql, php
- Language: PHP
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)] ```