File: /home/imensosw/.trash/app.1/Http/Controllers/CurrencyController.php
<?php
/**
* CurrencyController 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\Currency;
/**
* CurrencyController class
*
* The class manage the Translator Type
*
* @category CurrencyController
* @package Ez
* @author Imenso Software <admin@imensosoftware.com>
* @license http://imensosoftware/license.php GNU Public License
* @link http://imensosoftware.com/recipes
*/
class CurrencyController extends Controller
{
/**
* GetCurrency function gets the list of translator types
* and return it in json format.
*
* @param void
* @return json
*/
public function getCurrencyList(): \Illuminate\Http\JsonResponse
{
$currency = Currency::select('id','currency')->where('currency','!=','')->get();
return response()->json(
[
'status' => 'success',
'currency' => $currency->toArray(),
],
200
);
}
// end getCurrencyList()
}
// end class