refactor: remove console-specific resource registration and enhance OnboardingResource form schema

This commit is contained in:
2025-12-03 22:14:08 -05:00
parent bce5f99817
commit 09c2ca33d7
3 changed files with 7 additions and 13 deletions

View File

@@ -36,8 +36,7 @@ class OnboardingResource extends Resource
public static function form(Form $form): Form
{
return $form
->columns(1)
->components([
->schema([
TextInput::make('title')
->label('Title')
->required()
@@ -85,8 +84,6 @@ class OnboardingResource extends Resource
Select::make('page_route')
->label('Page to Guide To')
->visible(fn (Get $get): bool => $get('is_guided'))
->required(fn (Get $get): bool => $get('is_guided'))
->options([
'dashboard' => 'Dashboard',
'services' => 'Services',
@@ -100,8 +97,11 @@ class OnboardingResource extends Resource
'account.notifications' => 'Notifications',
'products' => 'Browse Products',
])
->helperText('Select which page the user should be guided to'),
]);
->helperText('Select which page the user should be guided to')
->visible(fn (Get $get): bool => $get('is_guided'))
->required(fn (Get $get): bool => $get('is_guided')),
])
->columns(1);
}
public static function table(Table $table): Table