海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.5 KiB

5 years ago
  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::namespace('App\Http\Controllers\Api')->group(function () {
  18. # 首页
  19. Route::post('index', 'IndexController@index');
  20. /*# 轮播图
  21. Route::prefix('slide')->group(function () {
  22. Route::post('list', 'SlideController@index'); //轮播图
  23. });
  24. # 频道
  25. Route::prefix('channel')->group(function () {
  26. Route::post('list', 'ChannelController@index'); //频道列表
  27. Route::post('my', 'ChannelController@my'); //我的频道列表
  28. });
  29. # 产品
  30. Route::prefix('product')->group(function () {
  31. Route::post('list', 'ProductController@index'); //产品列表
  32. Route::post('hot', 'ProductController@hot'); //人气爆款
  33. Route::post('guess', 'ProductController@guessLike'); //猜你喜欢
  34. });
  35. # 公告
  36. Route::prefix('notice')->group(function () {
  37. Route::post('list', 'NoticeController@index'); //公告列表
  38. });*/
  39. });