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: 4 days 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-27T07:18:09.000Z (7 months ago)
- Last Synced: 2025-03-29T21:42:29.968Z (4 months ago)
- Topics: jwt, laravel, mysql, php
- Language: PHP
- Homepage:
- Size: 137 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
## Tech Stack
- PHP
- Laravel
- 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)] ```