Level 1
I know about the general
->onlyOnIndex();
->hideFromIndex();
it is about the change of visibility if editing ;)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi there, is there a way to hide Fields if im in "editing" Mode?
I have a Select which options im getting with
value = integer;
Answer = cleartext;
Select::make(Answer','value')->options(function () {
return array_filter(\App\Models\Model::where('reference_id', $this->reference_id_foreign)->pluck('answer', 'value)->toArray());
}),
Which displays me the Value in the "basic" view, if im editing it shows me the answer. I have the cleartext Answer in a seperate Field, but without any relation. is there a way i can hide the "Text" Field if im editing?
ok.. i just discovered it myself
->hideWhenUpdating();
Please or to participate in this conversation.