fix design, add addresses

This commit is contained in:
Ludovic CANDELLIER
2022-12-29 16:16:09 +01:00
parent 7819a8e11b
commit 28c200fd9f
22 changed files with 165 additions and 75 deletions

View File

@@ -148,8 +148,22 @@ class Customers
public static function create($data)
{
$data['uuid'] = Str::uuid()->toString();
return Customer::create($data);
$user = Customer::create([
'uuid' => Str::uuid(),
'active' => true,
'first_name' => $data['first_name'],
'last_name' => $data['last_name'],
'company' => $data['company'],
'tva' => $data['tva'],
'phone' => $data['phone'],
'address' => $data['address'],
'address2' => $data['address2'],
'zipcode' => $data['zipcode'],
'city' => $data['city'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
return $user;
}
public static function update($data, $id = false)