44 行
1.2 KiB
PHP
44 行
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class CategoryController extends Controller {
|
|
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
|
|
return DB::table('str_category')
|
|
->select('*')
|
|
->where('id', $id)
|
|
->get();
|
|
}
|
|
|
|
public function getCategoryParent($id) { // /api/rpc/store/category/getcategoryparent/1
|
|
return DB::table('str_category')
|
|
->select('parent_id')
|
|
->where('id', $id)
|
|
->get();
|
|
}
|
|
|
|
public function getCategoryMinScreenshots($id) { // /api/rpc/store/category/getcategoryminscrot/1
|
|
return DB::table('str_category')
|
|
->select('min_screenshots')
|
|
->where('id', $id)
|
|
->get();
|
|
}
|
|
|
|
public function getCategoryName($id) { // /api/rpc/store/category/getcategoryname/id
|
|
return DB::table('str_category')
|
|
->select('name')
|
|
->where('id', $id)
|
|
->get();
|
|
}
|
|
}
|