diff --git a/README.md b/README.md index 9c592f3..3164317 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,24 @@ class TestController extends \Phalcon\Mvc\Controller { } ``` +### Controller (using Array): +```php +request->isAjax()) { + $array = $this->modelsManager->createQuery("SELECT * FROM \Example\Models\User") + ->execute()->toArray(); + + $dataTables = new DataTable(); + $dataTables->fromArray($array)->sendResponse(); + } + } +} +``` + ### Model: ```php