api for customer online update

This commit is contained in:
LAPTOP-DGCU80CH\user1
2020-11-17 10:47:35 +08:00
parent cb3a5b91c2
commit 057059feb0
6 changed files with 93 additions and 11 deletions
+8 -3
View File
@@ -31,9 +31,14 @@ class MarhunController extends Controller
return response()->json($marhun_all);
}
public function getAllJemas($kodcaw){
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$jemas = Jemas::on($cawangan['mysql'])->get();
public function getMarhunName (Request $request){
$jemas = Jemas::on('mysql7')->where('marhun','=',$request->marhun)->first();
return response()->json($jemas);
}
public function getAllJemas(){
$jemas = Jemas::on('mysql7')->get();
return response()->json($jemas);
}