Closed ricksonchew closed 2 months ago
You need to save the $user
for this to work.
Thanks @crynobone , saving data in the User model works as it is now getting the id
from the users table. However, my use case is that the user is already registered and has a data already on the users table in which I want it to "sync" on to the customers table. I tried getting the data of the user but no avail.
$users = new Users();
$user = $users->where('email', 'customer01@email.com')->first();
$users->createAsCustomer(array_merge($request->data, ['id' => $user->id]));
I am getting the same error , however for me , the name value is being null.
Cashier Paddle Version
2.4
Laravel Version
10.48.12
PHP Version
8.3
Database Driver & Version
No response
Description
When creating a customer using createAsCustomer(), billable_id is not passed and saved thus an error occur.
Steps To Reproduce
On your webhook controller: