Skip to content

Conversation

@p1xel007
Copy link
Contributor

@p1xel007 p1xel007 commented Nov 2, 2025

📝 Summary
This PR casts two new fields—trial_ends_at and ends_at—as datetime in the Subscription model.

🔧 Changes Included

  • Updated the Subscription model to cast these fields as datetime.
    This ensures that any date operations, such as calling format(), work correctly and prevents the Call to a member function format() on string exception in the application.

Casting trial_ends_at and ends_at fields as datetime so they don't throw exception when calling in the application
@bobbyiliev bobbyiliev requested a review from Copilot November 3, 2025 09:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds datetime casts for the trial_ends_at and ends_at attributes in the Subscription model, ensuring these timestamp fields are properly converted to Carbon datetime instances when accessed.

  • Added trial_ends_at datetime cast to ensure proper date handling
  • Added ends_at datetime cast to ensure proper date handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

p1xel007 and others added 2 commits November 3, 2025 21:52
The co-pilot reviewed error was likely a false positive, it's marking the "cancelled_at" cast as it doesn't belong there, however the app migrates this field and it's needed there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant