api.php 972 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register all of the routes for an application.
  8. | It is a breeze. Simply tell Lumen the URIs it should respond to
  9. | and give it the Closure to call when that URI is requested.
  10. |
  11. */
  12. $api = app('Dingo\Api\Routing\Router');
  13. $api->version('v1', [
  14. 'namespace' => 'App\Http\Controllers'
  15. ], function ($api) {
  16. //百度编辑器
  17. $api->get('ueupload', 'UeditorController@index');
  18. $api->post('ueupload', 'UeditorController@index');
  19. //前台
  20. $api->get('egg', 'IndexController@index');
  21. //后台
  22. //登录
  23. $api->post('login', 'AuthController@authenticate');
  24. $api->get('metas', 'MetaController@index');
  25. $api->post('meta', 'MetaController@create');
  26. $api->group(['middleware' => 'jwt.chxq_auth'], function ($api) {
  27. });
  28. });