Michal
Michal
FFilament
Created by Michal on 11/27/2023 in #❓┊help
Show hidden model attributes
What I am trying to do: I am trying to show hidden model attributes in form. What I did: Searched whole documentation and searched here in questions, but still can't solve it. My issue/the error: Hidden attributes is not accessible trough form. Is there any way make it visible like in Laravel when using $model->makeVisible(['provider_id', 'provider'])? Code: // Model
protected $hidden = ['provider', 'provider_id', 'content_id'];
protected $hidden = ['provider', 'provider_id', 'content_id'];
// Filament form
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make("title"),
TextInput::make("poster_image"),
TextInput::make("type"),
TextInput::make("provider"),
TextInput::make("provider_id"),
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make("title"),
TextInput::make("poster_image"),
TextInput::make("type"),
TextInput::make("provider"),
TextInput::make("provider_id"),
]);
}
13 replies