Skip to content
New issue

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

PHPORM-243 Alias _id to id in Schema::getColumns() #3160

Draft
wants to merge 1 commit into
base: 5.x
Choose a base branch
from

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 20, 2024

Fix PHPORM-243

❯ php artisan model:show book

  App\Models\Book .............................................................  
  Database ............................................................ mongodb  
  Table ................................................................. books  

  Attributes ...................................................... type / cast  
- _id ..................................................... objectId / accessor  
+ id ...................................................... objectId / accessor   
  author nullable ...................................................... string  
  created_at nullable ......................................... date / datetime  
  description nullable ................................................. string  
  isbn nullable ........................................................ string  
  publication_date nullable ............................................ string  
  title nullable ....................................................... string  
  updated_at nullable ......................................... date / datetime  
-  id ................................................................. accessor  

Required for API Platform integration with Laravel: https://github.com/api-platform/laravel/blob/e821ad27072228e4638f3de92d51fc3d15e02c7b/Eloquent/Metadata/ModelMetadata.php#L68

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file

@GromNaN GromNaN added this to the 5.0 milestone Sep 20, 2024
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