Chapter 5. Developing a Reservation System

In this chapter, you will learn how to configure and manage databases, using SQL or ActiveRecord directly, then you will see how to solve common tasks, such as saving single and multiple models from a form, and how to create data aggregation and filtered views.

We will cover the following topics in this chapter:

  • Configuring a DB connection:
    • For example, creating rooms, customers, and reservations tables
  • For example, testing a connection and executing a SQL query
  • Using Gii to create room, customer, and reservation models
  • Using ActiveRecord to manipulate data:
    • For example, querying rooms list with ActiveRecord
  • Working with relationships:
    • For example, using relationships to connect rooms, reservations, and customers ...

Get Yii2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.