TestResourceController.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. * @return \Illuminate\Http\Response
  11. */
  12. public function index()
  13. {
  14. return [
  15. 'index_resource' => true,
  16. ];
  17. }
  18. /**
  19. * Show the form for creating a new resource.
  20. *
  21. * @return \Illuminate\Http\Response
  22. */
  23. public function create()
  24. {
  25. return [
  26. 'create_resource' => true,
  27. ];
  28. }
  29. /**
  30. * Store a newly created resource in storage.
  31. *
  32. * @param \Illuminate\Http\Request $request
  33. *
  34. * @return \Illuminate\Http\Response
  35. */
  36. public function store(Request $request)
  37. {
  38. return [
  39. 'store_resource' => true,
  40. ];
  41. }
  42. /**
  43. * Display the specified resource.
  44. *
  45. * @param int $id
  46. *
  47. * @return \Illuminate\Http\Response
  48. */
  49. public function show($id)
  50. {
  51. return [
  52. 'show_resource' => $id,
  53. ];
  54. }
  55. /**
  56. * Show the form for editing the specified resource.
  57. *
  58. * @param int $id
  59. *
  60. * @return \Illuminate\Http\Response
  61. */
  62. public function edit($id)
  63. {
  64. return [
  65. 'edit_resource' => $id,
  66. ];
  67. }
  68. /**
  69. * Update the specified resource in storage.
  70. *
  71. * @param \Illuminate\Http\Request $request
  72. * @param int $id
  73. *
  74. * @return \Illuminate\Http\Response
  75. */
  76. public function update(Request $request, $id)
  77. {
  78. return [
  79. 'update_resource' => $id,
  80. ];
  81. }
  82. /**
  83. * Remove the specified resource from storage.
  84. *
  85. * @param int $id
  86. *
  87. * @return \Illuminate\Http\Response
  88. */
  89. public function destroy($id)
  90. {
  91. return [
  92. 'destroy_resource' => $id,
  93. ];
  94. }
  95. }