Skip to content

Commit

Permalink
telefone missing in api exeption
Browse files Browse the repository at this point in the history
  • Loading branch information
irshadali21 committed Jan 2, 2023
1 parent 1ef4233 commit 1cca757
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/Http/Controllers/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public function get_data(Request $request)
} else {
$report += ['pec_email' => ''];
}
if (isset($company['contactInformation']['mainAddress'])) {
// if (isset($company['contactInformation']['mainAddress'])) {
if (isset($company['contactInformation']['mainAddress']['telephone'])) {
$report += ['telephone' => $company['contactInformation']['mainAddress']['telephone']];
} else {
$report += ['telephone' => ''];
Expand All @@ -190,7 +191,7 @@ public function get_data(Request $request)
$report += ['address' => ''];
$report += ['region' => ''];
}
if (isset($company['directors'])) {
if (isset($company['directors']['currentDirectors'])) {
if (isset($company['directors']['currentDirectors'])) {
$report += ['director' => $company['directors']['currentDirectors']['0']['name']];
}else {
Expand All @@ -199,7 +200,7 @@ public function get_data(Request $request)
} else {
$report += ['director' => ''];
}
if (isset($company['companySummary']['mainActivity'])) {
if (isset($company['companySummary']['mainActivity']['code'])) {
$report += ['ateco_code' => $company['companySummary']['mainActivity']['code']];
} else {
$report += ['ateco_code' => ''];
Expand All @@ -221,7 +222,7 @@ public function get_data(Request $request)
'credit' => $report['credits'],
'company_administrator' => $report['director'],
]);
// dd($report);
dd($report);
return response()->json($report, 200, );
}

Expand Down Expand Up @@ -315,8 +316,8 @@ public function client_assignment($id)
// $data["email"] ='[email protected]';
// $mail = Notification::route('mail', $data["email"])->notify( new NewMessage());
// dd( $mail);


Mail::send('emails.myTestMail', $data, function ($message) use ($data, $pdf, $name) {
$message
->to($data["email"], $data["email"])
Expand Down Expand Up @@ -443,6 +444,6 @@ public function testemailnewmassge()
$data["email"] ='[email protected]';
$mail = Notification::route('mail', $data["email"])->notify( new NewMessage());
dd( $mail);

}
}

0 comments on commit 1cca757

Please sign in to comment.