block-explorer/src/Model/Table/InputsTable.php
2017-06-13 18:33:31 +00:00

30 lines
No EOL
725 B
PHP

<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class InputsTable extends Table {
public function initialize(array $config) {
parent::initialize($config);
$this->primaryKey('Id');
$this->table('Inputs');
$this->addBehavior('SimpleAudit');
$this->addAssociations([
'belongsToMany' => [
'InputAddresses' => [
'className' => 'App\Model\Table\AddressesTable',
'joinTable' => 'InputsAddresses',
'foreignKey' => 'InputId',
'targetForeignKey' => 'AddressId',
'propertyName' => 'InputAddresses'
]
]
]);
}
}
?>