You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
690 B
34 lines
690 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
namespace App\Controller;
|
|
|
|
|
|
use Hyperf\HttpServer\Contract\RequestInterface;
|
|
use Hyperf\HttpServer\Annotation\AutoController;
|
|
|
|
/**
|
|
* @AutoController()
|
|
* Class TestController
|
|
* @package App\Controller
|
|
*/
|
|
class TestController extends AbstractController
|
|
{
|
|
private $name = 'default action';
|
|
public function index1(RequestInterface $request)
|
|
{
|
|
$this->name = 'index1 action';
|
|
return $this->name;
|
|
}
|
|
|
|
public function index2(RequestInterface $request)
|
|
{
|
|
$this->name = 'index2 action';
|
|
return $this->name;
|
|
}
|
|
|
|
public function index3(RequestInterface $request)
|
|
{
|
|
return $this->name;
|
|
}
|
|
}
|