12345678910111213141516171819202122232425262728293031 |
- <?php
-
- namespace App\Controller;
-
- class BlocksController extends AppController
- {
- public function index()
- {
- $this->loadComponent('Paginator');
- $blocks = $this->Paginator->paginate($this->Blocks->find()
- ->order(['timestamp' => 'DESC'])
- );
- $this->set(compact('blocks'));
- }
-
- public function wallet($wallet = null)
- {
- $this->loadComponent('Paginator');
- $blocks = $this->Paginator->paginate($this->Blocks->find()
- ->where(['Blocks.wallet_from =' => $wallet])
- );
- $this->set(compact('blocks'));
- }
-
- public function view($blocknumber = null)
- {
- $block = $this->Blocks->findByBlocknumber($blocknumber)->firstOrFail();
- $this->set(compact('block'));
- $this->set(['parametro'=>123]);
- }
- }
|