1234567891011121314151617181920212223242526 |
- <?php
- namespace app\admin\controller;
- use support\Request;
- class Index
- {
- public function index(Request $request)
- {
- $data = [1,2,3];
- $a = json_encode($data);
- return response($a);
- }
- public function view(Request $request)
- {
- return view('index/view', ['name' => 'webman']);
- }
- public function json(Request $request)
- {
- return json(['code' => 1, 'msg' => 'ok']);
- }
- }
|