2018-01-24 04:19:18 +09:00
|
|
|
<?php
|
2018-01-24 01:36:47 +09:00
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2018-01-24 04:19:18 +09:00
|
|
|
use Illuminate\Support\Facades\DB;
|
2018-01-24 01:36:47 +09:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
|
|
|
|
class CategoryController extends Controller {
|
2018-01-24 04:19:18 +09:00
|
|
|
public function getCategories() { // /api/rpc/category/getcategories
|
2018-01-24 23:58:21 +09:00
|
|
|
return DB::table('str_category')
|
|
|
|
->select('*')
|
|
|
|
->get();
|
2018-01-24 01:36:47 +09:00
|
|
|
}
|
|
|
|
|
2018-01-24 04:19:18 +09:00
|
|
|
public function getCategory($id) { // /api/rpc/category/getcategory/1
|
2018-01-24 23:58:21 +09:00
|
|
|
return DB::table('str_category')
|
|
|
|
->select('*')
|
|
|
|
->where('id', $id)
|
|
|
|
->get();
|
2018-01-24 01:36:47 +09:00
|
|
|
}
|
|
|
|
|
2018-01-24 04:19:18 +09:00
|
|
|
public function getCategoryParent($id) { // /api/rpc/category/getcategoryparent/1
|
2018-01-24 23:58:21 +09:00
|
|
|
return DB::table('str_category')
|
|
|
|
->select('parent_id')
|
|
|
|
->where('id', $id)
|
|
|
|
->get();
|
2018-01-24 01:36:47 +09:00
|
|
|
}
|
|
|
|
|
2018-01-24 04:19:18 +09:00
|
|
|
public function getCategoryMinScreenshots($id) { // /api/rpc/category/getcategoryminscrot/1
|
2018-01-24 23:58:21 +09:00
|
|
|
return DB::table('str_category')
|
|
|
|
->select('min_screenshots')
|
|
|
|
->where('id', $id)
|
|
|
|
->get();
|
2018-01-24 01:36:47 +09:00
|
|
|
}
|
2018-01-31 20:05:52 +09:00
|
|
|
|
|
|
|
public function category($cat_id) { // /category/cat_id
|
|
|
|
return view('category', compact('cat_id'));
|
|
|
|
}
|
2018-01-24 01:36:47 +09:00
|
|
|
}
|