TestResourceController.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. * @return \Illuminate\Http\Response
  34. */
  35. public function store(Request $request)
  36. {
  37. return [
  38. 'store_resource' => true
  39. ];
  40. }
  41. /**
  42. * Display the specified resource.
  43. *
  44. * @param int $id
  45. * @return \Illuminate\Http\Response
  46. */
  47. public function show($id)
  48. {
  49. return [
  50. 'show_resource' => $id
  51. ];
  52. }
  53. /**
  54. * Show the form for editing the specified resource.
  55. *
  56. * @param int $id
  57. * @return \Illuminate\Http\Response
  58. */
  59. public function edit($id)
  60. {
  61. return [
  62. 'edit_resource' => $id
  63. ];
  64. }
  65. /**
  66. * Update the specified resource in storage.
  67. *
  68. * @param \Illuminate\Http\Request $request
  69. * @param int $id
  70. * @return \Illuminate\Http\Response
  71. */
  72. public function update(Request $request, $id)
  73. {
  74. return [
  75. 'update_resource' => $id
  76. ];
  77. }
  78. /**
  79. * Remove the specified resource from storage.
  80. *
  81. * @param int $id
  82. * @return \Illuminate\Http\Response
  83. */
  84. public function destroy($id)
  85. {
  86. return [
  87. 'destroy_resource' => $id
  88. ];
  89. }
  90. }