api.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. //use Illuminate\Http\Request;
  3. //use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. //Route::middleware('auth:api')->get('/user', function (Request $request) {
  15. // return $request->user();
  16. //});
  17. //
  18. //$api = app('Dingo\Api\Routing\Router');
  19. //
  20. //$api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($api) {
  21. // // test
  22. // $api->get('test', [
  23. // 'as' => 'test',
  24. // 'uses' => 'AuthController@test',
  25. // ]);
  26. // // Auth
  27. // // signin
  28. // $api->post('auth/login', [
  29. // 'as' => 'auth.login',
  30. // 'uses' => 'AuthController@login',
  31. // ]);
  32. // $api->post('auth/logout', [
  33. // 'as' => 'auth.logout',
  34. // 'uses' => 'AuthController@logout',
  35. // ]);
  36. // $api->post('auth/code', [
  37. // 'as' => 'auth.code',
  38. // 'uses' => 'AuthController@getCode',
  39. // ]);
  40. // // signup
  41. // $api->post('auth/register', [
  42. // 'as' => 'auth.register',
  43. // 'uses' => 'AuthController@register',
  44. // ]);
  45. // $api->post('auth/password', [
  46. // 'as' => 'auth.reset',
  47. // 'uses' => 'AuthController@setPassword',
  48. // ]);
  49. // $api->post('auth/check_password', [
  50. // 'as' => 'auth.check_password',
  51. // 'uses' => 'AuthController@check_password',
  52. // ]);
  53. // $api->post('auth/reset', [
  54. // 'as' => 'auth.reset',
  55. // 'uses' => 'AuthController@reset',
  56. // ]);
  57. // $api->get('auth/is_login', [
  58. // 'as' => 'auth.is_login',
  59. // 'uses' => 'AuthController@isLogin',
  60. // ]);
  61. //});