Owner controller works.

このコミットが含まれているのは:
テクニカル諏訪子 2018-01-24 05:27:35 +09:00
コミット 4689c7b0fa
2個のファイルの変更19行の追加18行の削除

ファイルの表示

@ -2,27 +2,28 @@
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class OwnerController extends Controller {
public function __contruct() {
// Init SQL.
public function getOwners() { // /api/rpc/owner/getowners
// $getUsers = DB::table('for_users')->select('id', 'username', 'display_name', 'name_colour', 'group', 'gender', 'avatar');
return DB::table('str_owners')
->select('*')
// ->union($getUsers)
->get();
}
public function getOwners() {
// Select all users from the database, and return the results.
public function getOwner($id) { // /api/rpc/owner/getowner/id
return DB::table('str_owners')->select('*')->where('id', $id)->get();
}
public function getOwner($id) {
// Select a specific user from the database, and return the result.
public function getOwnerFile($file_id) { // /api/rpc/owner/getownerfile/id
return DB::table('str_owners')->select('*')->where('file_id', $file_id)->get();
}
public function getOwnerFile($file_id) {
// Select a specific user from the database, and return the result.
}
public function getOwnerUser($user_id) {
// Select a specific user from the database, and return the result.
public function getOwnerUser($user_id) { // /api/rpc/owner/getowneruser/id
return DB::table('str_owners')->select('*')->where('user_id', $user_id)->get();
}
}

ファイルの表示

@ -37,16 +37,16 @@ Route::get('/api/rpc/file/getfile/{id}', 'FileController@getFile');
Route::get('/api/rpc/file/getfilesincategory/{cat_id}', 'FileController@getFilesInCategory');
// Owners
Route::get('/api/rpc/owners/getowners', 'OwnerController@getOwners');
Route::get('/api/rpc/owners/getowner/{id}', 'OwnerController@getOwner');
Route::get('/api/rpc/owners/getownerfile/{file_id}', 'OwnerController@getOwnerFile');
Route::get('/api/rpc/owners/getowneruser/{user_id}', 'OwnerController@getOwnerUser');
Route::get('/api/rpc/owner/getowners', 'OwnerController@getOwners');
Route::get('/api/rpc/owner/getowner/{id}', 'OwnerController@getOwner');
Route::get('/api/rpc/owner/getownerfile/{file_id}', 'OwnerController@getOwnerFile');
Route::get('/api/rpc/owner/getowneruser/{user_id}', 'OwnerController@getOwnerUser');
// Permissions
Route::get('/api/rpc/permissions/getpermissions', 'PermissionsController@getPermissions');
Route::get('/api/rpc/permission/getpermissions', 'PermissionsController@getPermissions');
// Users
Route::get('/api/rpc/users/getusers', 'UserController@getUsers');
Route::get('/api/rpc/user/getusers', 'UserController@getUsers');
/*Route::get('/api/rpc/example/getusers', 'ExampleController@getUsers');
Route::get('/api/rpc/example/getuser/{id}', 'ExampleController@getUser');