<?php

namespace App\Http\Controllers\Ajax;

use App\GenderLookup;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class GenderLookupAssignmentController extends Controller
{
    /**
     * @param Request $request
     * @return string
     */
    public function assignGender(Request $request) {

        $genderLookupId = $request->id;

        $genderLookup = new GenderLookup();
        $genderLookup = $genderLookup->find($genderLookupId);

        $genderLookup->gender = $request->gender;
        //$genderLookup->confidence = 100;
        $genderLookup->save();

        return '200';
    }
}
