41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\Api\V1\Access;
|
||
|
|
|
||
|
|
use App\Constant\Constant;
|
||
|
|
use Illuminate\Support\Facades\Log;
|
||
|
|
use App\Http\Controllers\Api\ApiController;
|
||
|
|
use App\Repositories\Api\Access\MotherTongue\MotherTongueInterface as MotherTongueRepository;
|
||
|
|
|
||
|
|
class MotherTongueController extends ApiController
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @param MotherTongueRepository $motherTongueRepository
|
||
|
|
* MotherTongueController constructor.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
public function __construct(MotherTongueRepository $motherTongueRepository)
|
||
|
|
{
|
||
|
|
$this->motherTongueRepository = $motherTongueRepository;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
public function getMotherTongueList()
|
||
|
|
{
|
||
|
|
$response = [];
|
||
|
|
|
||
|
|
try {
|
||
|
|
$response = $this->motherTongueRepository->getMotherTongueList();
|
||
|
|
$this->setStatusCode($response['status']);
|
||
|
|
|
||
|
|
} catch (\Exception $ex) {
|
||
|
|
Log::error($ex);
|
||
|
|
$this->setStatusCode(Constant::CODE_403);
|
||
|
|
}
|
||
|
|
|
||
|
|
return $this->respond($response);
|
||
|
|
}
|
||
|
|
}
|