We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When executing the following code: $user = Auth::user(); $plan = Plan::find(1); $user->newSubscription('Free', $plan)->create();
$user = Auth::user(); $plan = Plan::find(1); $user->newSubscription('Free', $plan)->create();
I'm getting the following errors: Illuminate \ Database \ QueryException (22007) SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2117-03-21 15:18:06' for column 'ends_at' at row 1 (SQL: insert into plan_subscriptions (plan_id, trial_ends_at, name, subscribable_id, subscribable_type, starts_at, ends_at, updated_at, created_at) values (1, , Free, 1, App\Models\User, 2018-03-21 15:18:06, 2117-03-21 15:18:06, 2018-03-21 15:18:06, 2018-03-21 15:18:06))
Illuminate \ Database \ QueryException (22007) SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2117-03-21 15:18:06' for column 'ends_at' at row 1 (SQL: insert into
(
,
) values (1, , Free, 1, App\Models\User, 2018-03-21 15:18:06, 2117-03-21 15:18:06, 2018-03-21 15:18:06, 2018-03-21 15:18:06))
The text was updated successfully, but these errors were encountered:
Found the error, i set the plan to:
'interval' => 'year', 'interval_count' => 99,
which caused this issue. changed it to 20 and it works
EDIT: didn't solved the issue apparently:
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2038-03-26 08:00:31' for column 'ends_at' at row 1 (SQL: insert into plan_subscriptions (plan_id, trial_ends_at, name, subscribable_id, subscribable_type, starts_at, ends_at, updated_at, created_at) values (6, , Free, 1, App\Models\User, 2018-03-26 08:00:31, 2038-03-26 08:00:31, 2018-03-26 08:00:31, 2018-03-26 08:00:31))
plan_subscriptions
plan_id
trial_ends_at
name
subscribable_id
subscribable_type
starts_at
ends_at
updated_at
created_at
EDIT: So, setting it to 3 years did solve the issue, this whole thing is an extension of the following: #32
This can be closed.
Sorry, something went wrong.
No branches or pull requests
When executing the following code:
$user = Auth::user(); $plan = Plan::find(1); $user->newSubscription('Free', $plan)->create();
I'm getting the following errors:
Illuminate \ Database \ QueryException (22007) SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2117-03-21 15:18:06' for column 'ends_at' at row 1 (SQL: insert into
plan_subscriptions(
plan_id,
trial_ends_at,
name,
subscribable_id,
subscribable_type,
starts_at,
ends_at,
updated_at,
created_at) values (1, , Free, 1, App\Models\User, 2018-03-21 15:18:06, 2117-03-21 15:18:06, 2018-03-21 15:18:06, 2018-03-21 15:18:06))
The text was updated successfully, but these errors were encountered: