fixed the listing of the contacts page

This commit is contained in:
Aqeeb Imtiaz Harun
2018-08-03 12:32:30 +08:00
parent 3fc889cd97
commit f4763b9b29
4 changed files with 80 additions and 17 deletions
+4 -4
View File
@@ -22,16 +22,16 @@ class CompanyController extends Controller
{
foreach ($matchedTerms as $key => $matchedTerm)
{
array_push($output, ['recipient_id'=> $matchedTerm->id, 'company_name' => $matchedTerm->company_name, 'tel_no' => $matchedTerm->tel_no, 'contact_person'=>$matchedTerm->contact_person ]);
array_push($output, ['recipient_id'=> $matchedTerm->id, 'company_name' => $matchedTerm->company_name, 'tel_no' => $matchedTerm->tel_no, 'contact_person'=>$matchedTerm->contact_person ]);
}
return response($output);
}
else
{
return response()->json(['error'=>'Company not found'], 404);
}
{
return response()->json(['error'=>'Company not found'], 404);
}
}
public function update(Request $request)
@@ -37,15 +37,6 @@ class ContactController extends Controller
}
}
// foreach ($contacts2 as $contact => $value) {
// print_r($value->sender_company_name);
// //if($value['sender_company_id'] == Auth::user()->company()->first()->id){
// // var_dump($contact);
// //print_r($value['sender_company_id']);
// //}
// //$contact->helo
// }
return response()->json($contacts2, 200);
}