Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to name a model file when table name is with _

Hi everyone! I'm making a API server with micro.

With tutorial I managed to fetch data from users table. but I don't know how to name a model file for tables that has _ in its name. e.g. users_authorizations

and I don't know how to describe it in PHQL. As tutorial, it would be like Store\Toys\something_aaa but i don't have idea

can anyone help me?? Thank you!

edited Feb '17

I think you can just CamelCase the classname.

Looking at the code of this forum,

The table in the SQL file for this model is called activity_notifications

Hi, just put the users_authorizations in the name

//filename - Users_authorizations.php
namespace XXX\YY\Models;

class Users_authorizations extends \Phalcon\Mvc\Model


Thank you guys Yes I got the problem solved!! You saved me

Just use camelcase to keep things with PSR4.