帶有Laravel 5和分形的REST API CRUD
使REST API CRUD LARAVEL 5和包裝分形(https://github.com/spatie/laravel-fractal)。
安裝Crud Api Laravel 5:
- 您可以更改連接數據庫的.env。
- 您可以首先使用
php artisan migrate的遷移數據庫進行導入數據庫TOU您的數據庫。 -
php artisan serve - 註冊用戶:http:// localhost:8000/api/auth/register(post)
- 登錄用戶:http:// localhost:8000/api/auth/login(post)
- 查看所有用戶:http:// localhost:8000/api/users(get) - >必須具有令牌ID,首先獲得寄存器的令牌ID
- 查看詳細信息用戶:http:// localhost:8000/api/users/{iduser}(get) - >必須具有令牌ID,首先獲得寄存器ID
- 插入內容:http:// localhost:8000/api/post(post) - >必須具有令牌ID,獲得寄存器的令牌ID
- 編輯內容:http:// localhost:8000/api/post/{idcontent}(put) - >必須擁有令牌ID,首先獲得寄存器ID
- 刪除內容:http:// localhost:8000/api/post/{idcontent}(delete) - >必須具有令牌ID,獲得帶有寄存器的令牌ID
有問題嗎?請給我發送電子郵件至[email protected](http://pujikartono.com)