mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update
This commit is contained in:
parent
63dd8b9292
commit
1d15f8eb03
@ -87,6 +87,22 @@ class UserController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function getStat (Request $request) {
|
||||
$stat = [
|
||||
Order::where('status', 0)
|
||||
->where('user_id', $request->session()->get('id'))
|
||||
->count(),
|
||||
Ticket::where('status', 0)
|
||||
->where('user_id', $request->session()->get('id'))
|
||||
->count(),
|
||||
User::where('invite_user_id', $request->session()->get('id'))
|
||||
->count()
|
||||
];
|
||||
return response([
|
||||
'data' => $stat
|
||||
]);
|
||||
}
|
||||
|
||||
public function getSubscribe (Request $request) {
|
||||
$user = User::find($request->session()->get('id'));
|
||||
$server = [];
|
||||
|
@ -68,6 +68,7 @@ Route::prefix('v1')
|
||||
Route::post('changePassword', 'UserController@changePassword');
|
||||
Route::post('update', 'UserController@update');
|
||||
Route::get ('getSubscribe', 'UserController@getSubscribe');
|
||||
Route::get ('getStat', 'UserController@getStat');
|
||||
// Order
|
||||
Route::get ('order', 'OrderController@index');
|
||||
Route::post('order/save', 'OrderController@save');
|
||||
|
Loading…
Reference in New Issue
Block a user