Skip to content

Conversation

freebuu
Copy link

@freebuu freebuu commented Oct 2, 2025

Hello!

I want to present an improve for HasRelationships::relationLoaded function - check loaded state of child relations in dot notation. It same as dot notation in load or with functions and fully backward compatible.
Before

$model->load('foo.bar')
$model->relationLoaded('foo') //true
$model->relationLoaded('foo.bar') //always false

After:

$model->load('foo.bar')
$model->relationLoaded('foo') //true
$model->relationLoaded('foo.bar') //true
$model->relationLoaded('foo.bar.baz') //false

@freebuu freebuu changed the title Add ability for recursive relation search [12.x] Add ability for recursive check relation load Oct 2, 2025
@freebuu freebuu marked this pull request as draft October 2, 2025 19:59
@freebuu
Copy link
Author

freebuu commented Oct 2, 2025

Ok my fail, it not work with hasMany and cannot work.

@freebuu freebuu closed this Oct 2, 2025
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