Game API calls.

このコミットが含まれているのは:
テクニカル諏訪子 2018-03-05 17:34:47 +09:00
コミット 23709ffbac
2個のファイルの変更21行の追加4行の削除

ファイルの表示

@ -7,29 +7,42 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class StoreController extends Controller {
// Category
// Game
public function getGames() { // /api/rpc/store/game/getgames
return DB::table('str_games')
->select('*')
->get();
}
public function getGame($id) { // /api/rpc/store/game/getgame/id
return DB::table('str_games')
->select('*')
->where('id', $id)
->get();
}
// Category
public function getCategories() { // /api/rpc/store/category/getcategories
return DB::table('str_category')
->select('*')
->get();
}
public function getCategory($id) { // /api/rpc/store/category/getcategory/1
public function getCategory($id) { // /api/rpc/store/category/getcategory/id
return DB::table('str_category')
->select('*')
->where('id', $id)
->get();
}
public function getCategoryGame($id) { // /api/rpc/store/category/getcategorygame/1
public function getCategoryGame($id) { // /api/rpc/store/category/getcategorygame/id
return DB::table('str_category')
->select('game_id')
->where('id', $id)
->get();
}
public function getCategoryMinScreenshots($id) { // /api/rpc/store/category/getcategoryminscrot/1
public function getCategoryMinScreenshots($id) { // /api/rpc/store/category/getcategoryminscrot/id
return DB::table('str_category')
->select('min_screenshots')
->where('id', $id)

ファイルの表示

@ -11,6 +11,10 @@
|
*/
// Games
Route::get('/api/rpc/store/games/getgames', 'StoreController@getGames');
Route::get('/api/rpc/store/games/getgame/{id}', 'StoreController@getGame');
// Category
Route::get('/api/rpc/store/category/getcategories', 'StoreController@getCategories');
Route::get('/api/rpc/store/category/getcategory/{id}', 'StoreController@getCategory');