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

This may just be a typo in your post, but are you calling setGroupMembership as a function or a property?

Last updated 2 years ago.
0

Whoops, yes typo in the post. Calling setGroupMembership() won't work. Perhaps because it's not in the interface? Is it bad practice to try to add to eloquent models?

Last updated 2 years ago.
0

I got it to work now apparently there is nothing stopping us from doing it. But still wondering if that is bad practice... It's all data and it is in the data layer but it feels "hacky" doing it.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

green255 green255 Joined 12 Feb 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.