Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added withDefault support to EmbedsOne relation #1541

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

Closed
axlon wants to merge 1 commit into mongodb:master from 23G:embeds-with-defaults

Conversation

@axlon
Copy link

@axlon axlon commented Jun 14, 2018

This pull request aims to add support for Laravel's withDefault function to the EmbedsOne relation, this function provides a way for 1 on 1 relations to define default data if no related model can be found.

Laravel documentation on this method: https://laravel.com/docs/5.6/eloquent-relationships (search for 'default models')

danjohnson95, lbrutti, and Giacomo92 reacted with thumbs up emoji
Copy link

Could really use this @jenssegers

@axlon axlon closed this Dec 27, 2018
Copy link

lbrutti commented Dec 18, 2023

hello @alcaeus , i think this PR could be very useful...

Giacomo92 reacted with thumbs up emoji

Copy link
Member

GromNaN commented Dec 18, 2023

As we try to stick to the features available in Eloquent, I think we can add this feature.

Would you like to open a new pull request, adding tests also.

Copy link

lbrutti commented Dec 19, 2023

I invoke @axlon for PR reopening and testing

Copy link
Member

GromNaN commented Dec 19, 2023

This feature request is tracker in Jira: PHPORM-128

lbrutti reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /