api.php 1.9 KB

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