Files
Global-Jain/app/Http/Controllers/Api/V1/Access/DharmaController.php
2025-11-05 10:37:10 +05:30

41 lines
951 B
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\Dharma\DharmaInterface as DharmaRepository;
class DharmaController extends ApiController
{
/**
* @param DharmaRepository $dharmaRepository
* DharmaController constructor.
*
*/
public function __construct(DharmaRepository $dharmaRepository)
{
$this->dharmaRepository = $dharmaRepository;
}
/**
* @return array
*/
public function getDharmaDetail()
{
$response = [];
try {
$response = $this->dharmaRepository->getDharmaDetail();
$this->setStatusCode($response['status']);
} catch (\Exception $ex) {
Log::error($ex);
$this->setStatusCode(Constant::CODE_403);
}
return $this->respond($response);
}
}