Mike.
make all images clickable and display in full
currently my code is like this
SpatieMediaLibraryImageEntry::make('product-image')
->collection('product-images')
->label(''),
then I want this image to be clickable and it will appear in full in the infolist
8 replies
Creatinga a new option in select
i using this code in select
->createOptionForm([
TextInput::make('label')
->label('New category')
->required(),
RichEditor::make('description')
]),
and when this code is clicked it adds a + button next to the select column and opens a modal, and I also use searchable so I want when a record is searched and the record doesn't exist it displays the option to create a new record but without displaying the modal, so I can type the data directly in the select
4 replies
How to disabled select in form
i have this code
Select::make('status')
->label('Status')
->required()
->options(collect(InvitationStatus::getValues())
->filter()
->mapWithKeys(fn ($value) => [$value => ucfirst($value)])
->toArray()
)
->default(InvitationStatus::PENDING->value)
->afterStateHydrated(fn ($set, $state) => $state ?: $set(InvitationStatus::PENDING->value)),
but i want to select this disabled,when i try to add '->disabled()' it gets error "General error: 1364 Field 'status' doesn't have a default value" can someone help me
4 replies