mirror of
https://github.com/v2board/v2board.git
synced 2025-02-11 16:00:27 +08:00
update
This commit is contained in:
parent
9f3aaac614
commit
153a0e9fdf
@ -33,6 +33,9 @@ class TicketController extends Controller
|
|||||||
$current = $request->input('current') ? $request->input('current') : 1;
|
$current = $request->input('current') ? $request->input('current') : 1;
|
||||||
$pageSize = $request->input('pageSize') >= 10 ? $request->input('pageSize') : 10;
|
$pageSize = $request->input('pageSize') >= 10 ? $request->input('pageSize') : 10;
|
||||||
$model = Ticket::orderBy('created_at', 'DESC');
|
$model = Ticket::orderBy('created_at', 'DESC');
|
||||||
|
if ($request->input('status') !== NULL) {
|
||||||
|
$model->where('status', $request->input('status'));
|
||||||
|
}
|
||||||
$total = $model->count();
|
$total = $model->count();
|
||||||
$res = $model->forPage($current, $pageSize)
|
$res = $model->forPage($current, $pageSize)
|
||||||
->get();
|
->get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user