block-explorer/src/Model/Table/InputsTable.php
2019-01-26 22:21:50 +01:00

30 lines
No EOL
734 B
PHP

<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class InputsTable extends Table {
public function initialize(array $config) {
parent::initialize($config);
$this->setPrimaryKey('id');
$this->setTable('input');
$this->addBehavior('SimpleAudit');
$this->addAssociations([
'belongsToMany' => [
'input_addresses' => [
'className' => 'App\Model\Table\AddressesTable',
'joinTable' => 'input_addresses',
'foreignKey' => 'input_id',
'targetForeignKey' => 'address_id',
'propertyName' => 'input_addresses'
]
]
]);
}
}
?>