Skip to content

Update to relationLoaded() causes problems when accessing attributes on a model containing a period #55518

@danharrin

Description

@danharrin

Laravel Version

12.10.0

PHP Version

8.3

Database Driver & Version

No response

Description

#55471 introduces a problem when attempting to access attributes on a model that contain a .. The framework calls the relationLoaded() method, which was updated to handle . as nested relationships in that PR.

Here is the link to the line that calls the method:

return $this->isRelation($key) || $this->relationLoaded($key)

Here is a related test failure:
https://github.com/filamentphp/filament/actions/runs/14589554182/job/40966543141

Steps To Reproduce

https://github.com/danharrin/laravel-relation-loaded-bug-report/commit/f29cef4eab3f50bc5e359da1019a93bf10434834

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions