api.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. use Illuminate\Http\Request;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. // 接口
  14. Route::group(['prefix' => 'api', 'namespace' => 'Api', 'middleware'=>'XSS'], function(){
  15. Route::group(['namespace' => 'Telegram'], function() {
  16. // tg消息webhook
  17. Route::post('telegram/getdata', 'TelegramController@getdata')->name('api.telegram.getdata');
  18. Route::post('test/getdata', 'TestController@getdata')->name('api.test.getdata');
  19. });
  20. Route::group(['namespace' => 'ThirdPart'], function() {
  21. // 查询余额
  22. Route::get('thirdpart/balance', 'ThirdPartController@balance')->name('api.thirdpart.balance');
  23. // 笔数下单
  24. Route::post('thirdpart/bishuorder', 'ThirdPartController@bishuorder')->name('api.thirdpart.bishuorder');
  25. // 闪租下单
  26. Route::post('thirdpart/shanzuorder', 'ThirdPartController@shanzuorder')->name('api.thirdpart.shanzuorder');
  27. });
  28. });