Now that we have the user architecture, before we continue with the rest of the database, let's create the models and a simple CLI task to register a new user.
If you have already installed the Phalcon Developer Tools, you can use them to generate models, or you can manually create them. You can also find them in the source code for this chapter.
Using the model generator will not create relations between tables. You have to manually create them.
All our models will extend the
Base models created in the previous chapter. Next, I will show you a few lines of code containing the important parts of the models, excluding the getters, setters, and protected variables.
User model will be located under the
App\Core\Models namespace ...