mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +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) {
|
public function getSubscribe (Request $request) {
|
||||||
$user = User::find($request->session()->get('id'));
|
$user = User::find($request->session()->get('id'));
|
||||||
$server = [];
|
$server = [];
|
||||||
|
@ -68,6 +68,7 @@ Route::prefix('v1')
|
|||||||
Route::post('changePassword', 'UserController@changePassword');
|
Route::post('changePassword', 'UserController@changePassword');
|
||||||
Route::post('update', 'UserController@update');
|
Route::post('update', 'UserController@update');
|
||||||
Route::get ('getSubscribe', 'UserController@getSubscribe');
|
Route::get ('getSubscribe', 'UserController@getSubscribe');
|
||||||
|
Route::get ('getStat', 'UserController@getStat');
|
||||||
// Order
|
// Order
|
||||||
Route::get ('order', 'OrderController@index');
|
Route::get ('order', 'OrderController@index');
|
||||||
Route::post('order/save', 'OrderController@save');
|
Route::post('order/save', 'OrderController@save');
|
||||||
|
Loading…
Reference in New Issue
Block a user