我试图从CodeIgniter转移到CakePHP,无法找出实现管理面板的最佳方法.在CI中,我将创建两个不同的应用程序,一个用于前端,一个用于管理面板.
在谷歌搜索后,我发现了三种在CakePHP中实现管理面板的方法:
我应该使用插件来实现管理面板还是应该有单独的应用程序?一个人比另一个人有什么好处?
我有REST API URL结构类似于:
/api/contacts GET Returns an array of contacts
/api/contacts/:id GET Returns the contact with id of :id
/api/contacts POST Adds a new contact and return it with an id added
/api/contacts/:id PUT Updates the contact with id of :id
/api/contacts/:id PATCH Partially updates the contact with id of :id
/api/contacts/:id DELETE Deletes the contact with id of :id
Run Code Online (Sandbox Code Playgroud)
我的问题是:
/api/contacts/:id GET
Run Code Online (Sandbox Code Playgroud)
假设除了通过ID获取联系人之外,我还想通过一个唯一的别名来获取它.
如果我希望能够通过ID或别名获取联系人,那么URI结构应该是什么?