StoreController.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Models\PaypalProduct;
  4. use Illuminate\Contracts\Foundation\Application;
  5. use Illuminate\Contracts\View\Factory;
  6. use Illuminate\Contracts\View\View;
  7. use Illuminate\Http\Request;
  8. use Illuminate\Http\Response;
  9. class StoreController extends Controller
  10. {
  11. /**
  12. * Display a listing of the resource.
  13. *
  14. * @return Application|Factory|View|Response
  15. */
  16. public function index()
  17. {
  18. $isPaypalSetup = false;
  19. if (env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) $isPaypalSetup = true;
  20. return view('store.index')->with([
  21. 'products' => PaypalProduct::where('disabled' , '=' , false)->orderBy('price' , 'asc')->get(),
  22. 'isPaypalSetup' => $isPaypalSetup
  23. ]);
  24. }
  25. /**
  26. * Show the form for creating a new resource.
  27. *
  28. * @return Response
  29. */
  30. public function create()
  31. {
  32. //
  33. }
  34. /**
  35. * Store a newly created resource in storage.
  36. *
  37. * @param Request $request
  38. * @return Response
  39. */
  40. public function store(Request $request)
  41. {
  42. //
  43. }
  44. /**
  45. * Display the specified resource.
  46. *
  47. * @param int $id
  48. * @return Response
  49. */
  50. public function show($id)
  51. {
  52. //
  53. }
  54. /**
  55. * Show the form for editing the specified resource.
  56. *
  57. * @param int $id
  58. * @return Response
  59. */
  60. public function edit($id)
  61. {
  62. //
  63. }
  64. /**
  65. * Update the specified resource in storage.
  66. *
  67. * @param Request $request
  68. * @param int $id
  69. * @return Response
  70. */
  71. public function update(Request $request, $id)
  72. {
  73. //
  74. }
  75. /**
  76. * Remove the specified resource from storage.
  77. *
  78. * @param int $id
  79. * @return Response
  80. */
  81. public function destroy($id)
  82. {
  83. //
  84. }
  85. }