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
.id
asid
,users
.name
asname
,users
.lastname
aslastname
,users
.document
asdocument
,users
.email
asemail
,users
.role_name
asrole_name
,users
.created_at
ascreated_at
fromusers
limit 10 offset 0)Beta Was this translation helpful? Give feedback.
All reactions