File: /home/imensosw/www/ezwork/app/Http/Controllers/PaymentMethodTypeController.php
<?php
/**
* PaymentMethodTypeController class file
*
* PHP Version 7.2
*
* @category Controller
* @package Ez
* @author Imenso Software <admin@imensosoftware.com>
* @license http://imensosoftware/license.php GNU Public License
* @link http://imensosoftware.com/recipes
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\PaymentMethodType;
/**
* PaymentMethodTypeController class
*
* The class manage the Payment Method Type
*
* @category PaymentMethodTypeController
* @package Ez
* @author Imenso Software <admin@imensosoftware.com>
* @license http://imensosoftware/license.php GNU Public License
* @link http://imensosoftware.com/recipes
*/
class PaymentMethodTypeController extends Controller
{
/**
* GetPaymentMethodTypes function gets the payment method types and
* return it in json format.
*
* @param void
* @return json
*/
public function getPaymentMethodTypes(): \Illuminate\Http\JsonResponse
{
$paymentMethodTypes = PaymentMethodType::get();
return response()->json(
[
'status' => 'success',
'paymentMethodTypes' => $paymentMethodTypes->toArray(),
],
200
);
}
// end getPaymentMethodTypes()
}
// end class