Files
Global-Jain/app/Http/Controllers/Api/V1/Access/MotherTongueController.php

41 lines
1.0 KiB
PHP
Raw Normal View History

2025-11-05 10:37:10 +05:30
<?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);
}
}