O'Reilly logo

FuelPHP Application Development Blueprints by Sébastien Drouyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Models, relations, and the ORM

We have now done the preliminary steps: we installed FuelPHP, configured it, generated the scaffold for managing the projects, and created the task model. We didn't connect the two models though, and we haven't yet displayed tasks anywhere. More importantly, we haven't explained how to load objects until now. This is the aim of this section.

Differences between CRUD and ORM

As we explained earlier, we used oil to generate code, but instead of using scaffold/crud as in Chapter 1, Building Your First FuelPHP Application, we used scaffold/orm and model/orm. If you take a look at the files (controllers, views, and models), you will only see minor changes, except for the model files:

  • The $_table_name attribute is no longer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required