<?php

namespace App\Http\Controllers;

use App\Models\Payments;
use Illuminate\Http\Request;

class PaymentsController extends Controller
{
    /**
     * Display a listing of the resource.
     */
    public function index()
    {
        //@Todo protect this feature
        $payments = Payments::all();
        return view('payments.payments', [ 'payments' => $payments ]);
    }

    public function show(Payments $payments)
    {
        $payments = Payments::all();
        return response()->json([
            "status" => "success",
            "data" =>[
                "pay" => $payments
            ]
        ]);
    }

}
