mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
20 lines
377 B
PHP
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
|
|
]);
|
|
|
|
}
|
|
|
|
} |