<?php

namespace App\Http\Controllers\Admin\Admin;

use App\Http\Controllers\Admin\Session\SessionIdController;
use App\Models\Admin;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Models\Fail;
use App\Models\Success;

class AdminIdController
{
    public function index($IdAdmin,Request $request)
    {
        // dd(SessionIdController::index($request->header('token')));
        $result = Admin::where('IdAdmin', $IdAdmin) ->get();
        if (count($result)>0){
            return json_encode ( $result[0]);
        }
        else return json_encode (null);
    }
}
