Store Customer, Store Booking details

This commit is contained in:
Kevin Adametz 2021-05-19 18:04:31 +02:00
parent b362b93bca
commit 6706d28f51
33 changed files with 1048 additions and 257 deletions

View file

@ -16,27 +16,13 @@ class CustomerRepository extends BaseRepository {
public function updateCustomer($id, $data)
{
$this->model = Customer::findOrFail($id);
$fill = [
'salutation_id' => $data['salutation_id'],
'name' => $data['name'],
'firstname' => $data['firstname'],
'street' => $data['street'],
'zip' => $data['zip'],
'city' => $data['city'],
'email' => $data['email'],
'phone' => $data['phone'],
'phonemobile' => $data['phonemobile'],
'country_id' => $data['country_id'],
];
$this->model->fill($fill);
$this->model->fill($data);
$this->model->save();
return $this->model;
}
public function updateCustomerFromLead($id, $data){
$lead = Lead::findOrFail($id);