Replies: 1 comment
-
|
You need to use a "label" if the field doesn't exist, just make sure that any fields used to generate the attribute are set in setAdditionalSelects |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello i have tis public function getFirstRoleNameAttribute(): ?Role
{
return $this->roles()->first()?->name;
}, how i call this data in a colum? whit this way Column::make(__("Role"), 'role_name'),
y have SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.role_name' in 'field list' (Connection: mysql, SQL: select
users.idasid,users.nameasname,users.lastnameaslastname,users.documentasdocument,users.emailasemail,users.role_nameasrole_name,users.created_atascreated_atfromuserslimit 10 offset 0)Beta Was this translation helpful? Give feedback.
All reactions