2017 © Pedro Peláez
 

library c5_base_model

A base model class for interacting with the database

image

triplei/c5_base_model

A base model class for interacting with the database

  • Thursday, March 9, 2017
  • by danklassen
  • Repository
  • 2 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

c5_base_model

A base model with some helpful functionality for interacting with database records in concrete5 7+, (*1)

basic usage:, (*2)


use TripleI\C5BaseModel\BaseModel class Widget extends BaseModel { /** * @var string * @Column(type="string", nullable=true) */ protected $name; /** * @var string * @Column(type="text", nullable=true) */ protected $description; } $widget = new Widget(); $widget->name = 'testing'; $widget->save(); $widget2 = new Widget(); $widget->setData( [ 'name' => 'widget name', 'description' => 'description here' ] ); $widget->save(); $allWidgets = Widget::getAll(); $oddWidgets = Widget::loadByIDs([1, 3, 5]); $singleWidget = Widget::getByID(1); $singleWidget->destroy();

The Versions

09/03 2017

dev-master

9999999-dev

A base model class for interacting with the database

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

concrete5

20/02 2017

1.0.1

1.0.1.0

A base model class for interacting with the database

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

concrete5

20/02 2017

1.0.0

1.0.0.0

A base model class for interacting with the database

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

concrete5

20/02 2017

0.0.1

0.0.1.0

A base model class for interacting with the database

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

concrete5