Comment counter.

このコミットが含まれているのは:
テクニカル諏訪子 2018-08-06 11:54:50 +09:00
コミット 03c83ed5f4
2個のファイルの変更7行の追加0行の削除

ファイルの表示

@ -553,6 +553,12 @@ class UserController extends Controller {
}
}
public function countComments($id) { // /api/rpc/user/comment/count/id
return DB::table('usr_comments')
->where('profile_id', $id)
->count();
}
public function getComments ($id, Request $request) { // /api/rpc/user/comment/get/id
$cols = $this->getGroupColours()->toArray();
$valid = $this->objAuth->getPermissions($request->username, $request->password);

ファイルの表示

@ -40,6 +40,7 @@ Route::post('/api/rpc/user/user/avatarupload', 'UserController@avatarUpload');
Route::post('/api/rpc/user/user/edit', 'UserController@editUser');
// Comment
Route::get('/api/rpc/user/comment/count/{id}', 'UserController@countComments');
Route::get('/api/rpc/user/comment/get/{id}', 'UserController@getComments');
Route::get('/api/rpc/user/comment/reply/{id}', 'UserController@getReplies');