- If you rename a field, then your users are fucked. Convert with a hardcoded array structure.
- Most DB drivers [for PHP] will show integers as numeric strings and
false
as"0"
, so you want to typecast them. - Unless you're using an ORM with "hidden" functionality, people will see passwords, salts and all sorts of fancy codes. If you add one and forget to put it in your
$hidden
array then OOPS!
- Use the query string for paired params instead of
/users/id/5/active/true
. Your API does not need to be SEO optimised. ?format=xml
is stupid, use anAccept: application/xml
header. I added this to the CodeIgniter Rest Server once for lazy people, and now people think it's a thing. It's not.