Files
InvoiceShelf/app/Http/Controllers/V1/Customer/Payment/PaymentMethodController.php
2024-01-29 04:46:01 -06:00

23 lines
618 B
PHP

<?php
namespace InvoiceShelf\Http\Controllers\V1\Customer\Payment;
use Illuminate\Http\Request;
use InvoiceShelf\Http\Controllers\Controller;
use InvoiceShelf\Http\Resources\Customer\PaymentMethodResource;
use InvoiceShelf\Models\Company;
use InvoiceShelf\Models\PaymentMethod;
class PaymentMethodController extends Controller
{
/**
* Handle the incoming request.
*
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request, Company $company)
{
return PaymentMethodResource::collection(PaymentMethod::where('company_id', $company->id)->get());
}
}