Hi There,
I have a custom requirement where i need to add an additiional attribute to the resultset from find()/ findFirst().
Eg: i have table user with fields id, name, status
User::find("id=1");
User::findFirst("id=1");
User::findFirst();
User::findFirstByid(1);
The regular output contains all the three fields from the database table. But, the expected result would be:
{
"user": {
"id": 1,
"name": "test user",
"status": 1,
"blah": "Hello World!"
}
}
Thanks in Advance!