DrillCategoryController.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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\MentalityDrillCategoryFacade;
  6. class DrillCategoryController extends BaseController
  7. {
  8. /**
  9. * Display a listing of the resource.
  10. *
  11. * @return \Illuminate\Http\Response
  12. */
  13. public function index(Request $request)
  14. {
  15. $conditions = [];
  16. $fields = ['*'];
  17. $sort = '`rank` desc';
  18. $page = request('page', 1);
  19. $limit = request('limit', 20);
  20. $requestUri = $request->getRequestUri();
  21. if ($requestUri!=null){
  22. if (strstr($requestUri,"mentality/drill_category")){
  23. $conditions["isSubject"] = true;
  24. }
  25. }
  26. return MentalityDrillCategoryFacade::getList($conditions, $fields, $sort, $page, $limit);
  27. }
  28. /**
  29. * Store a newly created resource in storage.
  30. *
  31. * @param \Illuminate\Http\Request $request
  32. * @return \Illuminate\Http\Response
  33. */
  34. public function store(Request $request)
  35. {
  36. //
  37. }
  38. /**
  39. * Display the specified resource.
  40. *
  41. * @param int $id
  42. * @return \Illuminate\Http\Response
  43. */
  44. public function show($id)
  45. {
  46. //
  47. }
  48. /**
  49. * Update the specified resource in storage.
  50. *
  51. * @param \Illuminate\Http\Request $request
  52. * @param int $id
  53. * @return \Illuminate\Http\Response
  54. */
  55. public function update(Request $request, $id)
  56. {
  57. //
  58. }
  59. /**
  60. * Remove the specified resource from storage.
  61. *
  62. * @param int $id
  63. * @return \Illuminate\Http\Response
  64. */
  65. public function destroy($id)
  66. {
  67. //
  68. }
  69. }