TestResourceController.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. namespace Mpociot\ApiDoc\Tests\Fixtures;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Routing\Controller;
  5. class TestResourceController extends Controller
  6. {
  7. /**
  8. * Display a listing of the resource.
  9. *
  10. * @response {
  11. * "index_resource": true
  12. * }
  13. *
  14. * @return \Illuminate\Http\Response
  15. */
  16. public function index()
  17. {
  18. return [
  19. 'index_resource' => true,
  20. ];
  21. }
  22. /**
  23. * Show the form for creating a new resource.
  24. *
  25. * @response {
  26. * "create_resource": true
  27. * }
  28. *
  29. * @return \Illuminate\Http\Response
  30. */
  31. public function create()
  32. {
  33. return [
  34. 'create_resource' => true,
  35. ];
  36. }
  37. /**
  38. * Store a newly created resource in storage.
  39. *
  40. * @param \Illuminate\Http\Request $request
  41. *
  42. * @return \Illuminate\Http\Response
  43. */
  44. public function store(Request $request)
  45. {
  46. return;
  47. }
  48. /**
  49. * Display the specified resource.
  50. *
  51. * @response {
  52. * "show_resource": true
  53. * }
  54. *
  55. * @param int $id
  56. *
  57. * @return \Illuminate\Http\Response
  58. */
  59. public function show($id)
  60. {
  61. return [
  62. 'show_resource' => $id,
  63. ];
  64. }
  65. /**
  66. * Show the form for editing the specified resource.
  67. *
  68. * @response {
  69. * "edit_resource": true
  70. * }
  71. *
  72. * @param int $id
  73. *
  74. * @return \Illuminate\Http\Response
  75. */
  76. public function edit($id)
  77. {
  78. return [
  79. 'edit_resource' => $id,
  80. ];
  81. }
  82. /**
  83. * Update the specified resource in storage.
  84. *
  85. * @param \Illuminate\Http\Request $request
  86. * @param int $id
  87. *
  88. * @return \Illuminate\Http\Response
  89. */
  90. public function update(Request $request, $id)
  91. {
  92. }
  93. /**
  94. * Remove the specified resource from storage.
  95. *
  96. * @param int $id
  97. *
  98. * @return \Illuminate\Http\Response
  99. */
  100. public function destroy($id)
  101. {
  102. }
  103. }