コード例 #1
0
ファイル: index.php プロジェクト: tipsyphp/tipsy-example-mvc
 public function init($args = null)
 {
     $this->inject(function ($Request) {
         header('Content-Type: application/json');
         // normaly you would use new \App\User($Request->loc(2)); when pulling for the db
         $user = new \App\User();
         echo json_encode($user->data());
     });
 }