api.php 1.9 KB

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