带有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)