如何在 Laravel 4 中构建 REST API 并添加用户 [英] How to build a REST API in Laravel 4 and add users

查看:28
本文介绍了如何在 Laravel 4 中构建 REST API 并添加用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Laravel 4 尝试构建 REST API.我必须创建一个资源丰富的控制器、模型和关联视图来管理多个 api 使用者.我希望每个 api 使用者(至少)具有 api_key 和 shared_secret 的属性.我一直在阅读 Jeremy Kendall 的 Query Auth 页面 @ http://jeremykendall.net/2013/08/13/api-query-authentication-with-query-auth/.我变得非常困惑.我不明白一切应该去哪里.

I am working with Laravel 4 attempting to build a REST API. I have to create a resourceful controller, model, and associated views for managing multiple api consumers. I want each api consumer to (at a minimum) have attributes for api_key and shared_secret. I have been reading Jeremy Kendall's page on Query Auth @ http://jeremykendall.net/2013/08/13/api-query-authentication-with-query-auth/. I am getting very confused. I do not understand where everything should go.

推荐答案

这里有一个关于用户认证的教程:https://medium.com/on-coding/e8d93c9ce0e2

Here's a tutorial on user authentication: https://medium.com/on-coding/e8d93c9ce0e2

这是关于 ACL 的一个:https://medium.com/on-coding/a7f2fa1f9791

Here's one on ACL: https://medium.com/on-coding/a7f2fa1f9791

这是 L4 中关于 REST API 的一个:https://medium.com/on-coding/c643022433ad

And here's one on REST API's in L4: https://medium.com/on-coding/c643022433ad

这篇关于如何在 Laravel 4 中构建 REST API 并添加用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆