<?php

namespace App\Http\Controllers;

use App\Models\Biodata;
use Exception;
use Illuminate\Http\Request;

class GetDataController extends Controller
{
    public function getBiodata(Request $request)
    {
        try {
            $biodata = Biodata::query()->where('nidn', $request->nidn)->first();

            return response()->json($biodata);
        } catch (Exception $ex) {
            return response('Not Found', 404);
        }
    }
}
