api.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. $api = app('Dingo\Api\Routing\Router');
  15. //
  16. $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($api) {
  17. // // test
  18. $api->get('login', [
  19. 'as' => 'login.login',
  20. 'uses' => 'LoginController@login',
  21. ]);
  22. $api->get('/index_menu', 'IndexController@indexMenu');
  23. // $api->post('auth/logout', [
  24. // 'as' => 'auth.logout',
  25. // 'uses' => 'AuthController@logout',
  26. // ]);
  27. // $api->post('auth/code', [
  28. // 'as' => 'auth.code',
  29. // 'uses' => 'AuthController@getCode',
  30. // ]);
  31. // // signup
  32. // $api->post('auth/register', [
  33. // 'as' => 'auth.register',
  34. // 'uses' => 'AuthController@register',
  35. // ]);
  36. // $api->post('auth/password', [
  37. // 'as' => 'auth.reset',
  38. // 'uses' => 'AuthController@setPassword',
  39. // ]);
  40. // $api->post('auth/check_password', [
  41. // 'as' => 'auth.check_password',
  42. // 'uses' => 'AuthController@check_password',
  43. // ]);
  44. // $api->post('auth/reset', [
  45. // 'as' => 'auth.reset',
  46. // 'uses' => 'AuthController@reset',
  47. // ]);
  48. // $api->get('auth/is_login', [
  49. // 'as' => 'auth.is_login',
  50. // 'uses' => 'AuthController@isLogin',
  51. // ]);
  52. });