SleepLevelController.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace App\Http\Controllers\Api\V1\Mentality;
  3. use Illuminate\Http\Request;
  4. use App\Http\Controllers\Api\V1\BaseController;
  5. use App\Facades\DiarySleepLevelFacade;
  6. class SleepLevelController extends BaseController
  7. {
  8. /**
  9. * Display a listing of the resource.
  10. *
  11. * @return \Illuminate\Http\Response
  12. */
  13. public function index()
  14. {
  15. $conditions = [];
  16. $fields = ['id','name','pic','hover_pic','color'];
  17. $sort = '`rank` desc, `id` desc';
  18. $page = request('page', 1);
  19. $limit = request('limit', 20);
  20. return DiarySleepLevelFacade::getList($conditions, $fields, $sort, $page, $limit);
  21. }
  22. /**
  23. * Store a newly created resource in storage.
  24. *
  25. * @param \Illuminate\Http\Request $request
  26. * @return \Illuminate\Http\Response
  27. */
  28. public function store(Request $request)
  29. {
  30. //
  31. }
  32. /**
  33. * Display the specified resource.
  34. *
  35. * @param int $id
  36. * @return \Illuminate\Http\Response
  37. */
  38. public function show($id)
  39. {
  40. //
  41. }
  42. /**
  43. * Update the specified resource in storage.
  44. *
  45. * @param \Illuminate\Http\Request $request
  46. * @param int $id
  47. * @return \Illuminate\Http\Response
  48. */
  49. public function update(Request $request, $id)
  50. {
  51. //
  52. }
  53. /**
  54. * Remove the specified resource from storage.
  55. *
  56. * @param int $id
  57. * @return \Illuminate\Http\Response
  58. */
  59. public function destroy($id)
  60. {
  61. //
  62. }
  63. }