<?php

namespace App\Http\Controllers;

use App\Coordination;
use App\Cawangan;

use Carbon\Carbon;
use Illuminate\Http\Request;

class PenyelarasanController extends Controller
{
    public function getPenyelarasan($kodcaw,Request $request){
        $cawangan = Cawangan::on('mysql7')->where('kodcaw',$kodcaw)->first();
        $coordination = Coordination::on($cawangan['mysql'])->where('date',$request->tarikh)->get();

        return response()->json($coordination);
    }
}
