初始化
This commit is contained in:
20
tests/stub/app/controller/Index.php
Normal file
20
tests/stub/app/controller/Index.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
use think\facade\Cookie;
|
||||
use think\Request;
|
||||
|
||||
class Index
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
Cookie::set('name', 'think');
|
||||
return 'test';
|
||||
}
|
||||
|
||||
public function json(Request $request)
|
||||
{
|
||||
return json($request->post());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user