api.php 967 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register all of the routes for an application.
  8. | It is a breeze. Simply tell Lumen the URIs it should respond to
  9. | and give it the Closure to call when that URI is requested.
  10. |
  11. */
  12. $api = app('Dingo\Api\Routing\Router');
  13. $api->version('v1', [
  14. 'namespace' => 'App\Http\Controllers\V1',
  15. ], function ($api) {
  16. $api->group(['middleware' => 'auth:api'], function ($api) {
  17. });
  18. $api->post('view', 'ShopController@getShop');
  19. //获取商户列表
  20. $api->post('getShopList', 'ShopController@getShopList');
  21. //登录+验签
  22. $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
  23. //获取商户详情
  24. });
  25. //仅验签
  26. $api->group(['middleware' => 'chxq_sign'], function ($api) {
  27. });
  28. });