api.php 1.8 KB

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