Files
simple-php-router/demo-project/app/Controllers/ApiController.php
T
2016-11-15 03:43:26 +01:00

20 lines
377 B
PHP

<?php
namespace Demo\Controllers;
use Pecee\SimpleRouter\SimpleRouter;
class ApiController {
public function index() {
// The variable authenticated is set to true in the ApiVerification middleware class.
header('content-type: application/json');
echo json_encode([
'authenticated' => request()->authenticated
]);
}
}