Closed Schop closed 4 years ago
Hmm, maybe I should add support for the asArray method.
I think it is equivalent to find()
and then call toArray()
or allToArray()
for multiple results.
$userModel = new UserModel();
$users = $userModel->find();
echo json_encode($users->allToArray());
Maybe you can show your use case.
Aha, I overlooked the allToArray() method. This will serve my purposes just fine. However, it would be nice if all the native methods of the CodeIgniter model would be supported.
Agree and noted.
When using the asArray() method of a model, I get the following error: