REST API CRUD With Laravel 5 and Fractal
Make REST API CRUD Laravel 5 and with Package Fractal (https://github.com/spatie/laravel-fractal).
To install crud API laravel 5 :
- You can change .env for connect database.
- you can use migrate database first with
php artisan migrate for import database tou your database.
php artisan serve
- Register User : http://localhost:8000/api/auth/register (POST)
- Login User : http://localhost:8000/api/auth/login (POST)
- View All User : http://localhost:8000/api/users (GET) -> Must have token id, get token id with register first
- View Detail User : http://localhost:8000/api/users/{iduser} (GET) -> Must have token id, get token id with register first
- Insert Content : http://localhost:8000/api/post (POST) -> Must have token id, get token id with register first
- Edit Content : http://localhost:8000/api/post/{idcontent} (PUT) -> Must have token id, get token id with register first
- Delete Content : http://localhost:8000/api/post/{idcontent} (DELETE) -> Must have token id, get token id with register first
Any question? please send me email to [email protected] (http://pujikartono.com)