FilamentPHP Glow Filament Glow
beta
  • All Tricks
  • About
login
logo dark logo light

Use translatable for relations in select components

Image Description
By: Lara Zeus
  • Published: 25 Mar 2024 Updated: 04 May 2024
Forms Panels

get translatable attribute in a relationships

Use translatable for relations in select components

when using a relations in a select menu or a filter, and that model is translatable, this is how to get the translatable attribute:

1->getOptionLabelFromRecordUsing(fn (Model $record) => $record->title)

Back to Tricks
logo dark logo light

Related Tricks:

Use translatable for relations in select components

get translatable attribute in a relationships

Disabling the cancel button on the filament editing form

Usability: Knowing whether or not the record was saved.

Form Builder Pesting with Livewire Volt

I’ll guide you on how to test your Form Builder using Livewire Volt with a class-based component.

Demonstration of using a resource for multiple typical models

how to use a resource with multiple models

Attach custom forms to any model

Form Builder lets you build dynamic, versioned forms in Filament and attach them to any model. Responses are stored in JSON with zero boilerplate.

Tweet
X GitHub RSS Feed
built with ❤️ using
filamentPHP
© 2026 Lara Zeus. All rights reserved.
Terms and Conditions Contact Us

Syntax highlighting by Torchlight .

FilamentPHP Glow Filament Glow
beta
    • All Tricks
    • About

Media Picker

  • No Files in the library or nothing found for your search.

Add Files

File