diff --git a/app/Classes/Modules/Exports/Services/ExportsCustomers.php b/app/Classes/Modules/Exports/Services/ExportsCustomers.php index 97d974e6..9f565c81 100644 --- a/app/Classes/Modules/Exports/Services/ExportsCustomers.php +++ b/app/Classes/Modules/Exports/Services/ExportsCustomers.php @@ -47,7 +47,7 @@ class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping return [ $company->reference, $company->name, - $company->employees()->first()->name, + $company->employees()->first() ? $company->employees()->first()->phone : '', $company->contacts()->first() ? $company->contacts()->first()->phone : '', $company->type === CompanyType::COMPANY_BUSINESS ? 'Company' : 'individual', count($company->bookings),