api.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. Route::middleware('auth:api')->namespace('Api')->group(function () {
  14. //查询矿区列表
  15. Route::get('mine/getmine', 'MineApiController@getMineList');
  16. //查询区域列表
  17. Route::get('mine/getlist', 'MineApiController@getAreaList');
  18. //查询工作面列表
  19. Route::post('surface/getlist', 'MineApiController@getSurfaceList');
  20. });
  21. Route::middleware('auth:api')->namespace('Api')->group(function () {
  22. //测试接口认证
  23. Route::get('test/apiauth', function () {
  24. return 'success';
  25. });
  26. });
  27. Route::namespace('Api')->group(function () {
  28. //根据摄像头ID查区域名称
  29. Route::post('mine/get_mine_by_camera_id', 'MineApiController@getMineByCameraId');
  30. });