lmsqueezy / laravel

A package to easily integrate your Laravel application with Lemon Squeezy.
https://lemonsqueezy.com
MIT License
503 stars 50 forks source link

Field 'lemon_squeezy_id' doesn't have a default value #49

Closed rvetrsek closed 11 months ago

rvetrsek commented 11 months ago

Lemon Squeezy for Laravel Version

1.2.2

Laravel Version

10.26.2

PHP Version

8.2

Description

The recent change to the 2023_01_16_000001_create_customers_table.php migration reopened a issue that was closed some time ago (https://github.com/lmsqueezy/laravel/issues/15).

Can this be fixed/reverted, or is it required just to generate a unique lemon_squeezy_id if creating a No Payment Required trial?

Steps To Reproduce

Create a No Payment Required trial for a user by following the readme:

use App\Models\User;

$user = User::create([
    // ...
]);

$user->createAsCustomer([
    'trial_ends_at' => now()->addDays(10)
]);
driesvints commented 11 months ago

Dang, sorry. Released v1.2.3 that fixes this.