mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-12-02 11:47:19 +00:00
14 lines
311 B
PHP
14 lines
311 B
PHP
<?php
|
|
|
|
$paging = isset($this->Paginator->options['url']) ? $this->Paginator->options['url'] : null;
|
|
|
|
$formatted = array(
|
|
'user' => $user['User']['username'],
|
|
'list' => array(),
|
|
'paging' => $paging,
|
|
);
|
|
foreach ($user['Item'] as $item) {
|
|
$formatted['list'][] = $item['name'];
|
|
}
|
|
|
|
echo json_encode($formatted);
|