public function gotoMap($id) { $mapCount = LotMap::where('id', $id)->get()->count(); if ($mapCount > 0) { return response()->json(array('success' => true, 'msg' => 'proceed')); } else { return response('fail'); } }
public function buildMaps($id) { $maps = LotMap::where('subdivision_id', $id)->get(); return ['data' => $maps, 'count' => $maps->count()]; }