You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attribute names of eagerly loaded polymorphic relationships are using snake casing, while other relationships (e.g., BelongsTo) are named in camel casing fashion. Example:
class Payment extends Model
{
public function paymentProfile()
{
return $this->belongsTo(PaymentProfile::class);
}
public function paymentDetails()
{
return $this->morphTo();
}
}
Hello,
The attribute names of eagerly loaded polymorphic relationships are using snake casing, while other relationships (e.g.,
BelongsTo
) are named in camel casing fashion. Example:Behaviour:
If I remember correctly, it should be independent of the relation type used and should follow the method's name (PaymentDetails in this case).
Jarno
The text was updated successfully, but these errors were encountered: