FilamentF
Filamentβ€’3y ago
Sidem

relation : How can i show the name and not the ID

Hi,

My code is :
Select::make('suivi_user_maintenance')
    ->relationship('suivipar', 'name',
        function ($query) {
            $query->where('statut', 1)
                ->with('role')
                ->whereHas('role', function ($q) {
                    $q->whereIn('name', ['S', 'RS', 'AF', 'AT']);
                })
                ->orderBy('name');
        }
    )


and i don"t know how show the name and not the id on the front :



If you have any idees for helping me it will be nice πŸ™‚
thanks you
image.png
Was this page helpful?