相关疑难解决方法(0)

Pagination在Cakephp 3.x中排序

在cakephp 3.xi中找不到分页顺序

这是我的控制器:

//AgentsController.php
public function show()
{
    $agents = $this->Agents->find()
    $this->set('agents', $this->paginate($agents));
}
Run Code Online (Sandbox Code Playgroud)

这是我观点的一部分

//show.ctp
<!-- ....... -->
<table class="table table-striped">
   <thead>
      <tr>
        <th>
            <?php echo $this->Paginator->sort('full_name', 'Nome', array('escape' => false)); ?>
        </th>
        <th>
            <?php echo $this->Paginator->sort('username', 'Email', array('escape' => false)); ?>
        </th>
        <th>
            <?php echo $this->Paginator->sort('regions', 'Regioni', array('escape' => false)); ?>
        </th>
      </tr>
   </thead>
<!-- ....... -->
Run Code Online (Sandbox Code Playgroud)

哪里错了?

php cakephp cakephp-3.0

3
推荐指数
1
解决办法
6854
查看次数

标签 统计

cakephp ×1

cakephp-3.0 ×1

php ×1