api.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. Route::prefix("v1")->group(function (){
  15. Route::middleware('throttle:' . config('api.rate_limits.sign'))
  16. ->group(function () {
  17. //登录
  18. Route::POST('login', 'LoginController@login');
  19. });
  20. Route::middleware(['throttle:' . config('api.rate_limits.access'),"authorizing"])
  21. ->group(function () {
  22. Route::prefix("waybill")->group(function () {
  23. Route::prefix("dispatch")->group(function () {
  24. Route::GET('/', 'WaybillController@getData');
  25. Route::POST('/', 'WaybillController@dispatch');
  26. Route::POST('dailyBilling', 'WaybillController@dailyBilling');
  27. });
  28. });
  29. Route::prefix("order")->group(function () {
  30. Route::GET('batchRecover', 'OrderController@recoverBatch');
  31. });
  32. });
  33. });