Add salutation field to contacts #13
This commit is contained in:
@@ -12,6 +12,7 @@ public function index()
|
||||
return [
|
||||
'id' => $contact->id,
|
||||
'customerId' => $contact->customer_id,
|
||||
'salutation' => $contact->salutation,
|
||||
'firstName' => $contact->first_name,
|
||||
'lastName' => $contact->last_name,
|
||||
'email' => $contact->email,
|
||||
@@ -36,6 +37,7 @@ public function show($id)
|
||||
return [
|
||||
'id' => $contact->id,
|
||||
'customerId' => $contact->customer_id,
|
||||
'salutation' => $contact->salutation,
|
||||
'firstName' => $contact->first_name,
|
||||
'lastName' => $contact->last_name,
|
||||
'email' => $contact->email,
|
||||
@@ -51,4 +53,4 @@ public function show($id)
|
||||
] : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,6 +344,7 @@ public function store(Request $request)
|
||||
'billingData.billingAddress.city' => 'nullable|string',
|
||||
'billingData.billingAddress.postalCode' => 'nullable|string',
|
||||
'billingData.billingAddress.countryCode' => 'nullable|string',
|
||||
'billingData.contactSalutation' => 'nullable|string',
|
||||
'billingData.contactFirstName' => 'nullable|string',
|
||||
'billingData.contactLastName' => 'nullable|string',
|
||||
'billingData.paymentTerms' => 'nullable|array',
|
||||
@@ -428,6 +429,7 @@ public function update(Request $request, $id)
|
||||
'billingData.billingAddress.city' => 'nullable|string',
|
||||
'billingData.billingAddress.postalCode' => 'nullable|string',
|
||||
'billingData.billingAddress.countryCode' => 'nullable|string',
|
||||
'billingData.contactSalutation' => 'nullable|string',
|
||||
'billingData.contactFirstName' => 'nullable|string',
|
||||
'billingData.contactLastName' => 'nullable|string',
|
||||
'billingData.paymentTerms' => 'nullable|array',
|
||||
|
||||
@@ -11,6 +11,7 @@ class Contact extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'salutation',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
|
||||
Reference in New Issue
Block a user