Category controller works.

このコミットが含まれているのは:
テクニカル諏訪子 2018-01-24 04:19:18 +09:00
コミット 1507fd506d
1個のファイルの変更10行の追加13行の削除

ファイルの表示

@ -1,28 +1,25 @@
B<?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 __contruct() {
// Init SQL.
public function getCategories() { // /api/rpc/category/getcategories
return DB::table('str_category')->select('*')->get();
}
public function getCategories() {
// Select all users from the database, and return the results.
public function getCategory($id) { // /api/rpc/category/getcategory/1
return DB::table('str_category')->select('*')->where('id', $id)->get();
}
public function getCategory($id) {
// Select a specific user from the database, and return the result.
public function getCategoryParent($id) { // /api/rpc/category/getcategoryparent/1
return DB::table('str_category')->select('parent_id')->where('id', $id)->get();
}
public function getCategoryParent($id) {
// Select a specific user from the database, and return the result.
}
public function getCategoryMinScreenshots($id) {
// Select a specific user from the database, and return the result.
public function getCategoryMinScreenshots($id) { // /api/rpc/category/getcategoryminscrot/1
return DB::table('str_category')->select('min_screenshots')->where('id', $id)->get();
}
}