96 lines
1.8 KiB
PHP
96 lines
1.8 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use App\Models\PaypalProduct;
|
||
|
use Illuminate\Contracts\Foundation\Application;
|
||
|
use Illuminate\Contracts\View\Factory;
|
||
|
use Illuminate\Contracts\View\View;
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Http\Response;
|
||
|
|
||
|
class StoreController extends Controller
|
||
|
{
|
||
|
/**
|
||
|
* Display a listing of the resource.
|
||
|
*
|
||
|
* @return Application|Factory|View|Response
|
||
|
*/
|
||
|
public function index()
|
||
|
{
|
||
|
$isPaypalSetup = false;
|
||
|
if (env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) $isPaypalSetup = true;
|
||
|
|
||
|
return view('store.index')->with([
|
||
|
'products' => PaypalProduct::where('disabled' , '=' , false)->orderBy('price' , 'asc')->get(),
|
||
|
'isPaypalSetup' => $isPaypalSetup
|
||
|
]);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Show the form for creating a new resource.
|
||
|
*
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function create()
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Store a newly created resource in storage.
|
||
|
*
|
||
|
* @param Request $request
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function store(Request $request)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Display the specified resource.
|
||
|
*
|
||
|
* @param int $id
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function show($id)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Show the form for editing the specified resource.
|
||
|
*
|
||
|
* @param int $id
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function edit($id)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Update the specified resource in storage.
|
||
|
*
|
||
|
* @param Request $request
|
||
|
* @param int $id
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function update(Request $request, $id)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Remove the specified resource from storage.
|
||
|
*
|
||
|
* @param int $id
|
||
|
* @return Response
|
||
|
*/
|
||
|
public function destroy($id)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
}
|