"Demography Configuration", "folder" => "Demography", "script" => "DemographyConfigScripts", ); $module = new Module(); $ModulesArray = $module->GetAllModules(); $demography = new Demography(); $fieldtypes = $demography->GetFieldType(); $DropDownNamelist = new DropDownName(); $GetlistField = $DropDownNamelist->GetDropDownName(); $panels=$demography->getPanels(); // $panels=$demography->getModulePanels($moduleId); // updated on 9th Sept '21 return view('Demography.DemographyConfig', compact('page', 'ModulesArray', 'fieldtypes','panels')); } public function GetDDNamesList(){ $DropDownNamelist = new DropDownName(); $DdNamesList = $DropDownNamelist->GetDropDownNameIds(); return json_encode($DdNamesList); } public function ConfigAddField(){ $Module = $_POST['Module']; $ColumnName = $_POST['ColumnName']; $LabelName = $_POST['LabelName']; $DisplayOnOff = $_POST['DisplayOnOff']; $displaytype = $_POST['displaytype']; $SetRequired = $_POST['SetRequired']; $SortOrder = $_POST['SortOrder']; $columnType = $_POST['columnType']; $fieldtype = $_POST['fieldtype']; $panelname=$_POST['Panelname']; $AddDropDownNameID=$_POST['AddDropDownNameID']; $config_array= array( 'Module' => "$Module", 'ColumnName' => "$ColumnName", 'LabelName' => "$LabelName", 'DisplayOnOff' => "$DisplayOnOff", 'DisplayType' => "$displaytype", 'SetRequired' => "$SetRequired", 'SortOrder' => "$SortOrder", 'columnType' => "$columnType", 'fieldtype' => "$fieldtype", 'panelname'=>"$panelname", 'AddDropDownNameID'=>"$AddDropDownNameID", 'Address'=>"0", ); $demography = new Demography(); $response = $demography->Addfields($config_array); return($response); } public function ConfigAddFieldAddress(){ // added on 9th Sept '21, called from DemographyConfigScripts.blade.php; for Type=24 // ShippingAddress_Addres/City/State/Pin/Country | groupid $Module = $_POST['Module']; $ColumnName = $_POST['ColumnName']; $LabelName = $_POST['LabelName']; $DisplayOnOff = $_POST['DisplayOnOff']; $displaytype = $_POST['displaytype']; $SetRequired = $_POST['SetRequired']; $SortOrder = $_POST['SortOrder']; // $columnType = $_POST['columnType']; $fieldtype = $_POST['fieldtype']; $panelname=$_POST['Panelname']; $AddDropDownNameID=$_POST['AddDropDownNameID']; $Address=array("Street","City","State","Pin","Country"); // $DisplayType=array("7","23","23","18","23"); // $ParentModule=array("","2ee02324-22bf-4c07-9930-3aa282e5cb72","ba03250a-e2a4-48b2-a598-ccd371aab074","","8c38107b-8100-402a-b81e-9ea42c052166"); // $GroupId = (string)Str::uuid(); for($i=0;$i "$Module", 'ColumnName' => "$new_ColumnName", 'LabelName' => "$new_LabelName", 'DisplayOnOff' => "$DisplayOnOff", 'DisplayType' => "$new_displaytype", 'SetRequired' => "$SetRequired", 'SortOrder' => "$new_SortOrder", 'fieldtype' => "$fieldtype", 'panelname'=>"$panelname", 'AddDropDownNameID'=>"$AddDropDownNameID", 'GroupId'=>"$GroupId", 'ParentModuleId'=>"$ParentModuleId", 'Address'=>"24", ); $demography_array=array( 'ModuleId' => "$Module", 'ColumnName' => "$new_ColumnName", 'FieldType' => "$fieldtype", 'DisplayType' => "$new_displaytype", 'SortOrder' => "$new_SortOrder", 'PanelId'=>"$panelname", 'GroupId'=>"$GroupId", ); $demography = new Demography(); $captureAddress = $demography->insertAddress($demography_array); $response = $demography->Addfields($config_array); } $status_array = array( 'Status' => 'Success', 'Message' => 'Created Successfully' ); return($status_array); } public function ConfigFieldUpdate() { $ConfigId = $_POST['ConfigId']; $UpdateField = $_POST['UpdateField']; $FieldValue = $_POST['FieldValue']; $demography = new Demography(); $status = $demography->UpdateConfig($ConfigId, $UpdateField, $FieldValue); return $status; } public function GetlistFields() { // being called from DemographyConfigScripts.blade.php, for displaying RelateTo & Dropdowns $fieldid = $_POST['fieldid']; $ConfigIdValue = $_POST['ConfigIdValue']; if(array_key_exists('loopcount', $_POST)) { $loopcount=$_POST['loopcount']; } else { $loopcount=0; } $DropDownNamelist = new DropDownName(); $GetlistField = $DropDownNamelist->GetDropDownName(); $module = new Module(); $ModulesArray = $module->GetAllModules(); return view('Demography.DemographyListNameFields', compact('GetlistField','fieldid','ModulesArray','ConfigIdValue','loopcount')); } public function getfields() { $moduleId = $_POST['module']; $demography = new Demography(); $fieldList = $demography->GetFieldList($moduleId); $fieldtypes = $demography->GetFieldType(); $panels=$demography->getModulePanels($moduleId); $DropDownNamelist = new DropDownName(); $GetlistField = $DropDownNamelist->GetDropDownName(); $module = new Module(); $ModulesArray = $module->GetAllModules(); $UsersList = new User(); $AssignedToList = $UsersList->getUsersList(); $GetDropdownList = new DropDownName(); $GetDropdownLists = $GetDropdownList->GetDropdownListArray(); $dg_model1 = new DGEditModel(); $RelateModules = $dg_model1->RelateModule($moduleId); $ListBoxNamesIDs = $dg_model1->ListBoxNamesID($moduleId); $RelatedModulesList = $dg_model1->RelatedModules($moduleId); return view('Demography.DemographyFields', compact('fieldList', 'fieldtypes','GetlistField', 'ModulesArray','panels','AssignedToList','GetDropdownLists','RelateModules','ListBoxNamesIDs','RelatedModulesList','moduleId')); //return $fieldList; } public function GetDemographyFields() { // calls from CreateAccountScripts & DGCreateScripts.blade.php files $ModuleId = $_POST['module']; //$ModuleId = '32f08263-96a5-11eb-948a-56b1773fd56f'; $demography = new Demography(); $fieldList = $demography->GetFieldListPanel($ModuleId); $fieldtypes = $demography->GetFieldType(); $panelList=$demography->getPanelList($ModuleId); $childList=$demography->getChildDropDownsLists(); $dg_model1 = new DGEditModel(); $RelateModules = $dg_model1->RelateModule($ModuleId); // added by navaneeth $ListBoxNamesIDs = $dg_model1->ListBoxNamesID($ModuleId); // listboxid $RelatedModulesList = $dg_model1->RelatedModules($ModuleId); // added by Jack on 23rd April '21 // pass all dropdown names, added on 23rd April '21 $type=1; // 2 - custome $GetDropdownList = new DropDownName(); //$GetDropdownLists = $GetDropdownList->GetAllDropdowns($type); $GetDropdownLists = $GetDropdownList->GetDropdownListArray(); // updated on 23rd April '21 $UsersList = new User(); // for Type=15 $AssignedToList = $UsersList->getUsersList(); $paneltype=$demography->getPanelType($ModuleId); $displayPaneltype= $paneltype->PanelType; $getDependentRelateToList=$demography->getDependentRelateToList($ModuleId); return view('Demography.DemographyCreateForm', compact('fieldList', 'fieldtypes', 'ModuleId', 'RelateModules', 'GetDropdownLists', 'ListBoxNamesIDs', 'RelatedModulesList','panelList','childList','AssignedToList','displayPaneltype','getDependentRelateToList')); } public function ConfigInsertData(Request $request){ // used to save data // dd($request->all()); // die(); // $parameters = $_POST; $ModuleId = $_POST['ModuleId']; $data_json = $_POST['data']; $source = $_POST['source']; // on 28th Jul '21 $association=array(); if($source=="QuickCreate") { $PrimaryModuleId=$_POST['PrimaryModuleId']; $RowId=$_POST['RowId']; // $association=array("PrimaryModuleId"=>$PrimaryModuleId,"RowId"=>$RowId); $association['PrimaryModuleId']=$PrimaryModuleId; $association['RowId']=$RowId; $association['msg']=$source; } else { $association['msg']=$source; } $data_array=json_decode($data_json,true); //$ModuleId=$data_array['ModuleId']; $PostData=array_splice($data_array, 1); // print_r($PostData); // die(); // get Table Name $module = new Module(); $ModulesArray = $module->GetAllModules(); $ModuleName=$ModulesArray[$ModuleId]; $demography = new Demography(); $multiSelectList=$demography->getMultiselectList($ModuleId); // $response = $demography->insertdata($PostData,$ModuleId,$ModuleName,$multiSelectList); // updated parameters on 28th Jul '21 $response = $demography->insertdata($PostData,$ModuleId,$ModuleName,$multiSelectList,$source,$association); return $response; } public function ConfigInsertDataFiles(Request $request){ // newly replicated on 4th May '21, last saved on 30-Apr-21 // $parameters = $_POST; $ModuleId = $_POST['ModuleId']; $data_json = $_POST['data']; $Postdata = $_POST['Postdata']; print_r($Postdata); die(); print_r($data_json); if ($request->hasFile('PhoneNumberWork')) { echo 'IN'; } $data_array=json_decode($data_json,true); //$ModuleId=$data_array['ModuleId']; $PostData=array_splice($data_array, 1); // print_r($data_array); // echo "
PostData:
"; print_r($data_array); echo "
PostData:
"; echo $siteurl=$_SERVER['HTTP_HOST']; if ($request->hasFile('PhoneNumberWork')) { $file = $request->file('PhoneNumberWork'); $name = time() . $file->getClientOriginalName(); echo $filePath = $siteurl.'/images/' . $name; $responce1=Storage::disk('s3')->put($filePath, file_get_contents($file)); // dd($responce1); echo $responce1; } echo die(); // get Table Name $module = new Module(); $ModulesArray = $module->GetAllModules(); $ModuleName=$ModulesArray[$ModuleId]; $demography = new Demography(); $response = $demography->insertdata($PostData,$ModuleId,$ModuleName); return $response; } public function CreateView($ModuleId) { // newly added on 15th April '21, for dynamically displaying CreateView $module = new Module(); $ModulesArray = $module->GetAllModules(); $ModuleName=$ModulesArray[$ModuleId]; $dg_model1 = new DGEditModel(); $RelateModules = $dg_model1->RelateModule($ModuleId); // added by navaneeth $demography=new Demography(); // print_r($paneltype); if($ModuleId == "0988a5c9-70f7-420c-8ecd-ef21ed9441c5"){ //CustomOrderLayout $TemplateLayoutID = '82ce9c87-b721-4dce-a544-d1b159f9076c'; $page = array( "title" => "Create Templates", "folder" => "TemplatesLayout", "script" => "CustomOrderLayoutScript", ); return view('TemplatesLayout.CustomOrderLayout',compact('page', 'TemplateLayoutID')); }else{ $page = array( "title" => "Create $ModuleName", "folder" => "Demography", "script" => "DGCreateScripts", ); return view('Demography.CreateView',compact('page','ModuleId','ModuleName','RelateModules')); } } public function ListView($ModuleId) { // newly added on 15th April '21, for dynamically displaying ListView $module = new Module(); $ModulesArray = $module->GetAllModules(); $ModuleName=$ModulesArray[$ModuleId]; $page = array( "title" => "ListView", // : $ModuleName "folder" => "Demography", "script" => "ListViewScripts", ); return view('Demography.ListView',compact('page','ModuleId','ModuleName')); } public function GetListViewPagination() { // newly added on 9th April '21, by Jack, called from ListViewScripts.blade.php $ModuleId = $_POST['ModuleId']; $page_num = $_POST['page_num']; $limit = $_POST['limit']; // updated on 15th April '21 $field_name = $_POST['field_name']; $sort_order = $_POST['sort_order']; $mode = $_POST['mode']; // get Table Name $module = new Module(); $ModulesArray = $module->GetAllModules(); $module_name=$ModulesArray[$ModuleId]; // get header data from configured DGListViews $dg_model = new DGModel(); // $header = $dg_model->GetEnabledListView($ModuleId); // not required $header = $dg_model->GetFieldNames($ModuleId); // field_names // added on 17th April '21 $source="ListViews"; // tablename $headers = $dg_model->GetDisplayNames($ModuleId,$source); // uncommented on 22nd April '21 // pass the dynamic field_names to Accounts table to get the data $total_records = $dg_model->GetResultsCount($module_name,$ModuleId,$header); // updated on 14th April '21 // $results = $dg_model->GetResultsPage($module_name,$ModuleId,$header,$page_num,$limit); // $results = $dg_model->GetResultsPageOrder($module_name,$ModuleId,$header,$page_num,$limit,$field_name,$sort_order); // commented on 26th April '21 // added on 22nd April '21 $dg_model1 = new DGEditModel(); $RelateModules = $dg_model1->RelateModule($ModuleId); $ListBoxNamesIDs = $dg_model1->ListBoxNamesID($ModuleId); // listboxid // pass all dropdown names $type=1; // 2 - custome $GetDropdownList = new DropDownName(); //$GetDropdownLists = $GetDropdownList->GetAllDropdowns($type); $GetDropdownLists = $GetDropdownList->GetDropdownListArray(); // updated on 23rd April '21 // added on 29th April '21 // pass AssignedTo value $UsersList = new User(); // for Type=15 $AssignedToList = $UsersList->getUsersList(); // added on 21st May '21 $user = auth()->user(); $UserId = $user->id; // commented on 26th Jul '21 /* $ActionId="4069d102-9833-11eb-948a-56b1773fd56f"; // ListView, FROM `DropDownLists` // $ActionId="d9a60660-9835-11eb-948a-56b1773fd56f"; // ListView, FROM `Role-Access`, not working // $ActionId="4067749c-9833-11eb-948a-56b1773fd56f"; // ListView, FROM `Role-Access`, not working $modules = new Module(); $ActionHeader = $modules->GetModulesActionUser($UserId,$ModuleId,$ActionId); // added on 26th Jul '21 $fake=1; if($ActionHeader['Result']=="Success") { $RoleAccess=$ActionHeader['ActionArray']['RoleAccess']; } else { $RoleAccess="8eca7f5f-9914-11eb-948a-56b1773fd56f"; // None } if($RoleAccess=="8eca7f5f-9914-11eb-948a-56b1773fd56f") { // added on 27th May '21 $page = array( "title" => "List View Screen", "folder" => "Demography", "script" => "", ); $view_screen="UserRole.NoRights"; return view("$view_screen",compact('page', 'user', 'module_name', 'ModuleId', 'ActionHeader', 'RoleAccess')); // , 'RoleAccesses', 'UserRelatedRoles', 'UserRelatedAccesses' } else { // added on 26th May '21 $results = $dg_model->GetResultsPageOrderAccess($module_name,$ModuleId,$header,$page_num,$limit,$field_name,$sort_order,$RoleAccess,$UserId); return view('Demography.ListViewPagination',compact('ModuleId', 'results', 'header', 'page_num', 'limit', 'total_records','field_name','sort_order','mode','headers','GetDropdownLists','RelateModules','ListBoxNamesIDs','AssignedToList')); } */ // updated on 26th Jul '21 $RoleAccess=''; $results = $dg_model->GetResultsPageOrderAccess($module_name,$ModuleId,$header,$page_num,$limit,$field_name,$sort_order,$RoleAccess,$UserId); return view('Demography.ListViewPagination',compact('ModuleId', 'results', 'header', 'page_num', 'limit', 'total_records','field_name','sort_order','mode','headers','GetDropdownLists','RelateModules','ListBoxNamesIDs','AssignedToList')); } public function getmodules() { $module = new Module(); $ModulesArray = $module->GetAllModules(); return json_encode($ModulesArray); } public function index() { // } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { // } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param \App\Models\Demography $demography * @return \Illuminate\Http\Response */ public function show(Demography $demography) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\Demography $demography * @return \Illuminate\Http\Response */ public function edit(Demography $demography) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Demography $demography * @return \Illuminate\Http\Response */ public function update(Request $request, Demography $demography) { // } /** * Remove the specified resource from storage. * * @param \App\Models\Demography $demography * @return \Illuminate\Http\Response */ public function destroy(Demography $demography) { // } public function SavePanel() { if($_POST['operation']=="update") { $id=$_POST['panelid']; } else { $id=(string)Str::uuid(); } $savedata['CreatedBy']=Auth::user()->name; $savedata['UpdatedBy']=Auth::user()->name; $savedata['PanelName']=$_POST['panelname']; $savedata['ModuleId']=$_POST['modules']; $savedata['SortOrder']=$_POST['sortorder']; $savedata['PanelType']=$_POST['panelType']; $operation=$_POST['operation']; $dashboard=new Demography(); $response=$dashboard->saveNewPanel($savedata,$operation,$id); return $response; } public function deletePanel($id) { $demography=new Demography(); $result=$demography->deleteDemographyPanel($id); return $result; } public function viewaccordian() { $page = array( "title" => "ListView", // : $ModuleName "folder" => "Demography", "script" => "ListViewScripts", ); return view('Demography.Demographyaccordian',compact('page')); } public function viewtab() { $page = array( "title" => "ListView", // : $ModuleName "folder" => "Demography", "script" => "ListViewScripts", ); return view('Demography.Demographytab',compact('page')); } public function ResetReferenceField() { $ConfigId=$_POST['ConfigId']; $UpdateField=$_POST['UpdateField']; $FieldValue=$_POST['FieldValue']; $module=$_POST['module_name']; $demography=new Demography(); $result=$demography->resetReferenceField($ConfigId,$UpdateField,$FieldValue,$module); return $result; } public function GetModulePanelsList() { $moduleId=$_POST['moduleid']; $demography=new Demography(); $panels=$demography->getModulePanels($moduleId); return view('Demography.PanelList',compact('panels')); } public function verifyParentDropdown() { $dropdownNameId=$_POST['DropDownNameId']; $moduleid=$_POST['moduleid']; $demography=new Demography(); $parentDropdownid=$demography->getParentDropdownId($dropdownNameId); $parentDropdownid= $parentDropdownid->ReferenceID; // die(); $result=""; if($parentDropdownid!="") { $result=$demography->parentDropdownVerify($moduleid,$parentDropdownid); $count=count($result); if($count>0) { $resultVal= "Assigned"; } else { $resultVal= "Not Assigned"; } } else { $resultVal= "NoParent"; } return $resultVal; } public function verifyChildExists() { // print_r($_POST); $moduleid=$_POST['ModuleId']; $parentFieldName=$_POST['fieldname']; $parentFieldValue=$_POST['fieldValue']; $demography=new Demography(); $parentDropdownId=$demography->getDropdownId($parentFieldName,$moduleid); $childDropdownId=$demography->getChildDropdownId($parentDropdownId); if(empty($childDropdownId)) { return $childData=array( 'field'=>"", 'dropdown'=>"" ); } // print_r($childDropdownId); // die(); $childDropdowns=array(); // foreach($childDropdownId as $childDD) // { // $childDropdowns[$childDD->DropDownNameId]=$childDD->DropDownNames; // $result=$demography->childDropdownsExists($childDD->DropDownNameId,$moduleid); // if(count($result)>0) // { // } // } $dropdown=""; $childDropdownName=""; $result=$demography->childDropdownsExists($childDropdownId->DropDownNameId,$moduleid); // print_r($result); if(!empty($result)) { $childDropdownName=$result->ColumnName; $ChildDropdownList=$demography->getChildDropdownLists($parentDropdownId,$childDropdownId,$parentFieldValue); } foreach ($ChildDropdownList as $childList) { // $childDropdowns[$childList->DropDownListId]=$childList->DropDownListName; $dropdown.=''; } $childData=array( 'field'=>$childDropdownName, 'dropdown'=>$dropdown ); // ['field']=$childDropdownName; // $childData['dropdown']=$dropdown; return json_encode($childData); // print_r($dropdown); } public function UploadFiles(Request $request) { $files=$request->all(); // echo $files[0]; // dd($files); $moduleid=$request->ModuleId; $demography=new Demography(); $moduleName=$demography->getModuleName($moduleid); $filesarray=array(); $UniqueReferenceId=(string)Str::uuid(); $loopcount=1; $hasfile=0; foreach($files as $field=>$key) { if($request->hasFile($field)) { $hasfile=1; $fieldName=$field; $filesarray[$loopcount]=$field; $loopcount++; $file=$request->file($field); $fileOriginalName=$file->getClientOriginalName(); $fileType=$file->getMimeType(); $size=$file->getSize(); $extension=$file->getClientOriginalExtension(); $id=(string)Str::uuid(); $name=md5(time()).$file->getClientOriginalName(); $filePath=$_SERVER['HTTP_HOST'].'/'.$moduleName.'/'.$name; $response=Storage::disk('s3')->put($filePath,file_get_contents($file)); $filePath="https://cloudmyschoolone.s3.ap-south-1.amazonaws.com/".$filePath; $demography=new Demography(); $result=$demography->storeTempFile($moduleid,$fileOriginalName,$fileType,$size,$extension,$filePath,$id,$UniqueReferenceId,$fieldName,$name); } } if($hasfile==0) { $UniqueReferenceId=""; } $reference=array( 'id'=>$UniqueReferenceId, ); return json_encode($reference); } public function DownloadFiles($url) { $demography=new Demography(); $file=$demography->getFile($url); $filename=$file->NewFileName; $moduleId=$file->ModuleId; $moduleName=$demography->getModuleName($moduleId); // echo $url; // $url="https://cloudmyschoolone.s3.ap-south-1.amazonaws.com/crm.bpm360.net/Documents/27d7e8ea314f4bcac0b0c5312ded0076image.png"; return Storage::disk('s3')->download($_SERVER['HTTP_HOST']."/".$moduleName."/".$filename); // echo Storage::disk('s3')->download($_SERVER['HTTP_HOST']."/".$moduleName."/".$filename); } public function QuickLinksConfigure() { $page = array( "title" => "QuickLinks", // : $ModuleName "folder" => "QuickLinks", "script" => "QuickLinksConfigureScripts", ); $module = new Module(); $ModulesArray = $module->GetAllModules(); $demography=new Demography(); $modulesIDs=$demography->GetQuickLinksCount(); $count=count($modulesIDs); return view("QuickLinks.QuickLinksConfigure",compact('page','ModulesArray','count','modulesIDs')); } public function QuickLinkInsertData() { $ModuleId=$_POST['ModuleID']; $value=$_POST['value']; $demography=new Demography(); $result=$demography->QuickLinkInsertData($ModuleId,$value); return $result; } public function LoadQuickLinks() { $module = new Module(); $ModulesArray = $module->GetAllModules(); $demography=new Demography(); $modulesIDs=$demography->GetQuickLinksCount(); return view("layouts.QuickLinks",compact('ModulesArray','modulesIDs')); } public function SetDefaultValue() { $configId=$_POST['ConfigId']; $FieldValue=$_POST['FieldValue']; $demography=new Demography(); $result=$demography->SetDefaultValue($configId,$FieldValue); return $result; } public function GetModifiedDefaultField() { $configId=$_POST['ConfigId']; $ModuleId=$_POST['moduleId']; $loopcount=$_POST['loopcount']; $DropDownNamelist = new DropDownName(); $module = new Module(); $UsersList = new User(); $GetDropdownList = new DropDownName(); $dg_model1 = new DGEditModel(); $demography=new Demography(); $GetlistField = $DropDownNamelist->GetDropDownName(); $ModulesArray = $module->GetAllModules(); $AssignedToList = $UsersList->getUsersList(); $GetDropdownLists = $GetDropdownList->GetDropdownListArray(); $ListBoxNamesIDs = $dg_model1->ListBoxNamesID($ModuleId); $fieldList=$demography->GetModifiedDefaultFields($configId,$ModuleId); $newFieldList=array(); foreach ($fieldList[0] as $key => $value) { $newFieldList[$key]=$value; } $RelatedModulesList = $dg_model1->RelatedModules($ModuleId); $RelateModules = $dg_model1->RelateModule($ModuleId); return view('Demography.ModifiedDefaultField',compact('ModulesArray','AssignedToList','GetDropdownLists','RelateModules','ListBoxNamesIDs','newFieldList','loopcount','RelatedModulesList')); } public function addIndex() { $statusArray=array( "title"=>"Index", "status"=>"Added Successfully", ); // print_r($_POST); return json_encode($statusArray); } public function removeIndex() { $statusArray=array( "title"=>"Index", "status"=>"Removed Successfully", ); // print_r($_POST); return json_encode($statusArray); } public function GetChildRelateTo() { // print_r($_POST); $PrimaryModuleId=$_POST['ParentModuleId']; $ModuleId=$_POST['ModuleId']; $DependentValueId=$_POST['DependentValueId']; $demography=new Demography(); $childRelatedList=$demography->GetChildRelateTo($PrimaryModuleId); $SecondaryModuleId=$childRelatedList[0]->SecondaryModuleId; $getSecondaryModuleList=$demography->getSecondaryModuleList($SecondaryModuleId,$DependentValueId); $getSecondaryModuleColumnList=$demography->getSecondaryModuleColumnList($SecondaryModuleId,$ModuleId); // print_r($getSecondaryModuleList); return view('Demography.RelatedChilds',compact('getSecondaryModuleList','getSecondaryModuleColumnList')); //SELECT * FROM `ModuleAssociations` where PrimaryModuleId='8c38107b-8100-402a-b81e-9ea42c052166' } public function LoadModulePanels() { $ModuleId=$_POST['moduleid']; $demography=new Demography(); $panelsList=$demography->getModulePanels($ModuleId); return json_encode($panelsList); } }