api.php 779 B

12345678910111213141516171819202122
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | API Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register API routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | is assigned the "api" middleware group. Enjoy building your API!
  10. |
  11. */
  12. $api = app('Dingo\Api\Routing\Router');
  13. $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\mini', 'prefix' => 'api/mini', 'middleware' => 'mini'], function ($api) {
  14. $api->any('test', 'TestController@index');
  15. $api->any('login', 'AuthController@login');
  16. $api->any('reset', 'AuthController@reset');
  17. $api->any('loginByWechat', 'AuthController@loginByWechat');
  18. });