PHP code example of baka / database

1. Go to this page and download the library: Download baka/database library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

baka / database example snippets




namespace Canvas\Models;

class Leads extends \Baka\Database\Model
{
    use CustomFieldsTrait;
}



namespace Canvas\Models;

use \Baka\Database\CustomeFieldsInterface;

class LeadsCustomFields extends \Baka\Database\Model implements CustomeFieldsInterface
{
   /**
     * Set the custom primary field id
     *
     * @param int $id
     */
    public function setCustomId(int $id)
    {
        $this->leads_id = $id;
    }
}



namespace Canvas\Models;

class Leads extends \Baka\Database\Model
{
    use HashTableTrait;
}