first commit
This commit is contained in:
33
app/Controller/api/v1/UserController.php
Executable file
33
app/Controller/api/v1/UserController.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\api\v1;
|
||||
|
||||
use App\Controller\AbstractController;
|
||||
use App\FormModel\api\v1\UserModel;
|
||||
use App\Request\Test;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
|
||||
#[Controller]
|
||||
class UserController extends AbstractController
|
||||
{
|
||||
|
||||
#[RequestMapping(path: '/api/v1/user/register', methods: 'post')]
|
||||
public function register(Test $validator)
|
||||
{
|
||||
$validator = $validator->validated();
|
||||
$model = new UserModel();
|
||||
$model->register();
|
||||
return [];
|
||||
}
|
||||
|
||||
public function login()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function logout()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user