diff --git a/src/Model.php b/src/Model.php index d3aba21..31bdf58 100644 --- a/src/Model.php +++ b/src/Model.php @@ -34,7 +34,14 @@ public function __construct(Context $database) $this->model = $this->getModel(); } - + /** + * Get the table associated with a model based on the model class name. + * If you use different table use setTable() + * + * Eg: UserModel.php -> Table Name: User + * + * @return string + */ protected function getTable(): string { preg_match('#(\w+)Model$#', get_class($this), $m); @@ -43,7 +50,8 @@ protected function getTable(): string /** - * Specify the table associated with a model + * Specify the table name associated with a model. + * You can change table on the runtime using setTable(). * * @param string $table *