refactor: update product feature icon to text input and remove required validation from core product fields

This commit is contained in:
Ümit Tunç
2026-05-26 23:49:22 +03:00
parent c68e95631b
commit 5848cd5189
2 changed files with 4 additions and 10 deletions
@@ -104,10 +104,8 @@ class LandingPageSection
Repeater::make('landing_page_data.features')
->label(__('products.features'))
->schema([
Select::make('icon')
->label(__('products.feature_icon'))
->options($iconOptions)
->searchable(),
TextInput::make('icon')
->label(__('products.feature_icon')),
TextInput::make('title')
->label(__('products.feature_title'))
->columnSpanFull(),
@@ -25,7 +25,6 @@ class ProductForm
->schema([
TextInput::make('title')
->label(__('products.title'))
->required()
->live(onBlur: true)
->afterStateUpdated(function (Get $get, Set $set, ?string $state) {
$set('slug', Str::slug($state));
@@ -35,15 +34,13 @@ class ProductForm
->dehydrated(false),
TextInput::make('slug')
->label(__('products.slug'))
->required()
->unique(ignoreRecord: true),
Select::make('type')
->label(__('products.type'))
->options([
'product' => __('products.product'),
'service' => __('products.service'),
])
->required(),
]),
Select::make('product_category_id')
->label(__('products.category'))
->options(function () {
@@ -54,7 +51,6 @@ class ProductForm
->searchable(),
FileUpload::make('hero_image')
->label(__('products.hero_image'))
->required()
->image()
->disk('public')
->directory('products'),
@@ -81,7 +77,7 @@ class ProductForm
'title' => [
'type' => 'text',
'label' => __('products.title'),
'required' => true,
'required' => false,
],
'content' => [
'type' => 'richtext',