kingtox
How to access the Search variable inside recordSelectOptionsQuery of Relation Manager
i am working on advance relationship which is Many to Many Polymorphic, all the relation are working fine for attach and detach, however when i search for specific name in the AttachAction it shows an error, is there any way we can disable
$recordTitleAttribute
and search for the record in recordSelectOptionsQuery()
this is what i tried so far!
i would like to search for a record in $query->whereHas('user')
3 replies
HasManythrough showing wrong owner record Id
Hey 👋
In my model I have a relationship
public function resultLog()
{
return $this->hasManyThrough(
ResultLog::class, Result::class,
'user_id', 'result_id', 'id', 'id'
);
}
I define primary key in my modal as a user_id, but for some reason the relation manager is showing wrong user_id of the owner record, it shows random user_id.
20 replies
hide a column in table builder
I have a relation manager,
In relation manager I wanted to hide a column in table builder.
I try this
Tables\Columns\IconColumn::make('saml')
->boolean()
->trueIcon('heroicon-o-badge-check')
->falseIcon('heroicon-o-x-circle')
->hidden(fn($record) => dd($record->saml == 1)),
But it’s giving me an error
Attempt to read property "saml" on null
4 replies