mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 02:30:09 +03:00
22 lines
407 B
PHP
22 lines
407 B
PHP
<?php
|
|
namespace Demo\Controllers;
|
|
|
|
use Pecee\Http\Request;
|
|
|
|
class ApiController {
|
|
|
|
public function index() {
|
|
|
|
// The variable authenticated is set to true in the ApiVerification middleware class.
|
|
|
|
$request = Request::getInstance();
|
|
|
|
header('content-type: application/json');
|
|
|
|
echo json_encode([
|
|
'authenticated' => $request->authenticated
|
|
]);
|
|
|
|
}
|
|
|
|
} |