Get group name.

このコミットが含まれているのは:
テクニカル諏訪子 2018-02-15 00:54:43 +09:00
コミット 09de6110de
2個のファイルの変更11行の追加2行の削除

ファイルの表示

@ -71,15 +71,23 @@ class UserController extends Controller {
->get();
}
public function getGroupName($id) { // /api/rpc/user/user/getgroupname/id
return DB::table('usr_perm_module')
->join('usr_perm_id', 'usr_perm_id.perm_id', '=', 'usr_perm_module.id')
->where('user_id', $id)
->get(array(
'name',
// 'badge' (this is a pipeline feature, please don't uncomment for now!)
));
}
public function getGroupColours() { // /api/rpc/user/user/getgroupcolours
return DB::table('usr_perm_module')
->select(
'id',
'name',
'colour_m',
'colour_f',
'colour_u'
// 'badge' (this is a pipeline feature, please don't uncomment for now!)
)
->get();
}

ファイルの表示

@ -19,4 +19,5 @@ Route::get('/api/rpc/user/owner/getentriesofowner/{id}', 'UserController@getEntr
Route::get('/api/rpc/user/user/getusers', 'UserController@getUsers');
Route::get('/api/rpc/user/user/getuser/{id}', 'UserController@getUser');
Route::get('/api/rpc/user/user/getpoststyle/{id}', 'UserController@getPostStyle');
Route::get('/api/rpc/user/user/getgroupname/{id}', 'UserController@getGroupName');
Route::get('/api/rpc/user/user/getgroupcolours', 'UserController@getGroupColours');