mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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);
|