<?php
require "../../bootstrap.php";
use Backend\Model\User;
header('Content-Type: application/json;charset=UTF-8');
if(isset($_POST['id']))
$data = User::find($_POST['id']);
else
$data = User::all('id', 'name');
echo $data;