8000 增加日志接口 改进首页显示 · czsvn/laravel_template_with_vue@bd47c94 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd47c94

Browse files
committed
增加日志接口 改进首页显示
1 parent 6950ea4 commit bd47c94

24 files changed

+787
-770
lines changed

Screenshots/QQ.png

102 KB
Loading

Screenshots/blog.png

1.51 KB
Loading

Screenshots/dashboard.png

26.1 KB
Loading

Screenshots/weixin1.png

41.7 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
use Illuminate\Support\Facades\DB;
7+
use Illuminate\Support\Facades\Response;
8+
9+
class LogController extends Controller
10+
{
11+
//
12+
use Result;
13+
14+
public function index(Request $request)
15+
{
16+
$pageSize = $request->input('pageSize', 10);
17+
$page = $request->input('page', 1);
18+
$data = DB::table('log_logins')->select(['id', 'user_name', 'type', 'desc'])->paginate($pageSize);
19+
return Response()->json($data);
20+
}
21+
22+
}

0 commit comments

Comments
 (0)
0