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