Ver código fonte

Добавлено получение RecId и LinkItemID предметов из таблицы CashShopAll

ilg2005 1 mês atrás
pai
commit
a49dee7037
2 arquivos alterados com 12 adições e 0 exclusões
  1. 9 0
      app/Http/Controllers/Cash/CashShopController.php
  2. 3 0
      routes/api.php

+ 9 - 0
app/Http/Controllers/Cash/CashShopController.php

@@ -196,4 +196,13 @@ class CashShopController extends Controller
         return response()->json($datajson, 200);
     }
 
+    // Получение RecId и LinkItemID предметов из таблицы CashShopAll
+    public function getItemsDetails(Request $request)
+    {
+        // возвращает RecId и LinkItemID предметов из таблицы CashShopAll
+        $itemDetails = CashShopAll::all(['RecId', 'LinkItemID']);
+
+        return response()->json($itemDetails, 200);
+    }
+
 }

+ 3 - 0
routes/api.php

@@ -39,6 +39,9 @@ Route::group(['prefix' => 'api'], function () {
     Route::get('GetCharItem/{table}/{char_item_id}', 'CharController@GetCharItem');
     Route::post('UpdateCharItem/{table}/{char_item_id}', 'CharController@UpdateCharItem');
     
+    // Получение RecId предметов из CashShopAll
+    Route::get('getItemsDetails', 'Cash\CashShopController@getItemsDetails');
+    
     // Получение и обновление квеста по char_id и RecId, {table?} — опционально, по умолчанию CharQuest    
     Route::get('GetCharQuest/{char_id}/{rec_id}/{table?}', 'CharController@GetCharQuest');
     Route::post('UpdateCharQuest/{char_id}/{rec_id}/{table?}', 'CharController@UpdateCharQuest');