19 lines
356 B
PHP
19 lines
356 B
PHP
<?php
|
|
|
|
namespace Api\Users;
|
|
|
|
use Khofmann\Api\Api;
|
|
use Khofmann\Input\Input;
|
|
use Khofmann\Models\User\User;
|
|
use Khofmann\Response\Response;
|
|
|
|
class Users extends Api
|
|
{
|
|
public function get()
|
|
{
|
|
$page = max(0, intval(Input::get("p", 0)));
|
|
$limit = constrain(0, 30, intval(Input::get("l", 10)));
|
|
Response::json(User::list($page, $limit));
|
|
}
|
|
}
|