api.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/get-search', 'LandMarkController@getSearch');
  23. $api->get('/land-mark/do-like', 'LandMarkController@doLike');
  24. $api->post('/login', 'LoginController@login');
  25. $api->post('/attachment/upload', 'AttachmentController@upload');
  26. $api->post('/land-mark/do-comment', 'LandMarkController@doComment');
  27. // $api->post('auth/logout', [
  28. // 'as' => 'auth.logout',
  29. // 'uses' => 'AuthController@logout',
  30. // ]);
  31. // $api->post('auth/code', [
  32. // 'as' => 'auth.code',
  33. // 'uses' => 'AuthController@getCode',
  34. // ]);
  35. // // signup
  36. // $api->post('auth/register', [
  37. // 'as' => 'auth.register',
  38. // 'uses' => 'AuthController@register',
  39. // ]);
  40. // $api->post('auth/password', [
  41. // 'as' => 'auth.reset',
  42. // 'uses' => 'AuthController@setPassword',
  43. // ]);
  44. // $api->post('auth/check_password', [
  45. // 'as' => 'auth.check_password',
  46. // 'uses' => 'AuthController@check_password',
  47. // ]);
  48. // $api->post('auth/reset', [
  49. // 'as' => 'auth.reset',
  50. // 'uses' => 'AuthController@reset',
  51. // ]);
  52. // $api->get('auth/is_login', [
  53. // 'as' => 'auth.is_login',
  54. // 'uses' => 'AuthController@isLogin',
  55. // ]);
  56. });