diff --git a/src/Controller/StateUsersController.php b/src/Controller/StateUsersController.php index 77f466285..1ef92801b 100644 --- a/src/Controller/StateUsersController.php +++ b/src/Controller/StateUsersController.php @@ -443,7 +443,11 @@ class StateUsersController extends AppController public function view($id = null) { $stateUser = $this->StateUsers->get($id, [ - 'contain' => ['StateBalances', 'TransactionCreations' => ['Transactions'], 'TransactionSendCoins' => ['Transactions']] + 'contain' => [ + 'StateBalances', + 'TransactionCreations' => ['Transactions'], + 'TransactionSendCoins' => ['Transactions', 'ReceiverUsers'], + 'TransactionReceivedCoins' => ['Transactions', 'StateUsers']] ]); $this->set('stateUser', $stateUser); diff --git a/src/Model/Table/StateUsersTable.php b/src/Model/Table/StateUsersTable.php index 1d645f34d..77f026d0a 100644 --- a/src/Model/Table/StateUsersTable.php +++ b/src/Model/Table/StateUsersTable.php @@ -61,10 +61,10 @@ class StateUsersTable extends Table $this->hasMany('TransactionSendCoins', [ 'foreignKey' => 'state_user_id' ]); - /*$this->hasMany('TransactionReceiveCoins', [ + $this->hasMany('TransactionReceivedCoins', [ 'className' => 'TransactionSendCoins', 'foreignKey' => 'receiver_user_id' - ]);*/ + ]); } /** diff --git a/src/Template/StateUsers/view.ctp b/src/Template/StateUsers/view.ctp index 480f82794..3e7dc134e 100644 --- a/src/Template/StateUsers/view.ctp +++ b/src/Template/StateUsers/view.ctp @@ -4,7 +4,7 @@ * @var \App\Model\Entity\StateUser $stateUser */ ?> -