for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Gewaer\Models;
use Gewaer\Models\AbstractModel;
class CompaniesCustomFields extends AbstractModel
{
/**
*
* @var integer
*/
public $id;
public $companies_id;
public $custom_fields_id;
* @var string
public $value;
public $is_deleted;
public $created_at;
public $updated_at;
* Initialize method for model.
public function initialize()
$this->setSource('companies_custom_fields');
$this->belongsTo(
'companies_id',
'Gewaer\Models\Companies',
'id',
['alias' => 'company']
);
'custom_fields_id',
'Gewaer\CustomFields\CustomFields',
['alias' => 'fields']
}
* Returns table name mapped in the model.
* @return string
public function getSource(): string
return 'companies_custom_fields';
* Set the custom primary field id
* @param int $id
public function setCustomId(int $id)
$this->companies_id = $id;