Support the ongoing development of Laravel.io →
Input Database Eloquent
Last updated 2 years ago.
0
Solution

Oh... I found this comment:

// If the "attribute" exists as a method on the model, we will just assume
// it is a relationship and will load and return results from the query
// and hydrate the relationship's value on the "relationships" array.

Strange behavior. It seems you cant have attribute and method with same name.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kticka kticka Joined 7 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.