File: phptricksORM/Command/Templates/create.template

Recommend this page to a friend!
  Classes of mohammad anzawi  >  PHP PDO database class  >  phptricksORM/Command/Templates/create.template  >  Download  
File: phptricksORM/Command/Templates/create.template
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP PDO database class
Access databases using PDO
Author: By
Last change:
Date: 3 months ago
Size: 507 bytes
 

Contents

Class file image Download
<?php

require_once 'vendor/autoload.php';

use
PHPtricks\Orm\Builder;
class {%
CLASS_NAME%} extends Builder
{
    protected
$_table = '{%TABLE_NAME%}';

    public function
run()
    {
        return
$this->schema([
           
'id' => 'increments',
           
'string' => 'string:255|not_null|unique',
           
'datetime' => 'datetime',
           
'integer' => 'int|unsigned',
           
'unique' => 'string:255|not_null|unique',
           
'created_at' => 'timestamp',
        ])->
create();
    }
}


For more information send a message to info at phpclasses dot org.