api.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /** @var TYPE_NAME $api */
  14. $api = app('Dingo\Api\Routing\Router');
  15. $api->version('v1',[
  16. 'namespace'=>'App\Http\Controllers'
  17. ],function ($api){
  18. $api->post('admin/login','AdminController@login');
  19. $api->get('captcha','TestController@image');
  20. $api->post('login','TestController@login');
  21. $api->get('users/me','TestController@me');
  22. $api->get('menus/routes','TestController@routes');
  23. $api->group(['middleware' => 'check_token'], function ($api) {
  24. $api->get('Apply/GetApplyList','AdminController@GetApplyList');
  25. $api->get('Apply/SearchInfo','AdminController@SearchInfo');
  26. $api->post('Apply/AddUserInfo','AdminController@AddUserInfo');
  27. $api->get('Apply/DelApply','AdminController@DelApply');
  28. $api->group(['prefix' => 'ApplyDel'], function ($api) {
  29. $api->get('GetApplyList','ApplyDelController@GetApplyList');
  30. $api->get('SearchInfo','ApplyDelController@SearchInfo');
  31. $api->post('AddUserInfo','ApplyDelController@AddUserInfo');
  32. $api->get('DelApply','ApplyDelController@DelApply');
  33. $api->get('Examine','ApplyDelController@Examine');
  34. $api->post('UploadFile','ApplyDelController@UploadFile');
  35. $api->post('UploadFileMedia','ApplyDelController@UploadFileMedia');
  36. });
  37. });
  38. });