Apex\App\Base\Model\BaseModel

Description

Create, manage and retrieve records from the assigned model class that implements this class.

Static Methods

  • public static all() - Get all records from the database table.
  • public static count() - Get the number of records within the database table with optional where clause.
  • public static deleteMany() - Delete multiple records from the database table.
  • public static insert() - Insert a new record into the database table.
  • public static insertOrUpdate() - Insert or update a record within the database table.
  • public static purge() - Purge and delete all records within the database table.
  • public static update() - Update multiple records within the database table.
  • public static where() - Select multiple records from the database table.
  • public static whereFirst() - Get a model instance of the first record found for a given where clause.
  • public static whereId() - Select a single model instance based on the value of the primary key / id column.


Non-Static Methods

  • public delete() - Delete a single model instance from the database table.
  • public getChildren() - Get child records based on a foreign key constraint.
  • public save() - Save and update an individual model instance.
  • public toArray() - Get all properties of the model instance returned in an array.