api.php 1.9 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. //
  14. $api = app('Dingo\Api\Routing\Router');
  15. //
  16. $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($api) {
  17. // // test
  18. Route::group(['middleware' => 'auth:api'], function(){
  19. });
  20. $api->get('/land-mark/get-land-mark', 'LandMarkController@getLandMark');
  21. $api->get('/land-mark/get-detail', 'LandMarkController@getDetail');
  22. $api->get('/land-mark/do-like', 'LandMarkController@doLike');
  23. $api->post('/login', 'LoginController@login');
  24. $api->post('/attachment/upload', 'AttachmentController@upload');
  25. $api->post('/land-mark/do-comment', 'LandMarkController@doComment');
  26. // $api->post('auth/logout', [
  27. // 'as' => 'auth.logout',
  28. // 'uses' => 'AuthController@logout',
  29. // ]);
  30. // $api->post('auth/code', [
  31. // 'as' => 'auth.code',
  32. // 'uses' => 'AuthController@getCode',
  33. // ]);
  34. // // signup
  35. // $api->post('auth/register', [
  36. // 'as' => 'auth.register',
  37. // 'uses' => 'AuthController@register',
  38. // ]);
  39. // $api->post('auth/password', [
  40. // 'as' => 'auth.reset',
  41. // 'uses' => 'AuthController@setPassword',
  42. // ]);
  43. // $api->post('auth/check_password', [
  44. // 'as' => 'auth.check_password',
  45. // 'uses' => 'AuthController@check_password',
  46. // ]);
  47. // $api->post('auth/reset', [
  48. // 'as' => 'auth.reset',
  49. // 'uses' => 'AuthController@reset',
  50. // ]);
  51. // $api->get('auth/is_login', [
  52. // 'as' => 'auth.is_login',
  53. // 'uses' => 'AuthController@isLogin',
  54. // ]);
  55. });