How can I set the default value of a Select, when its hidden?

                    Select::make('status')
                        ->label('Status')
                        ->options(Status::all()->pluck('name', 'id'))
                        ->searchable()
                        ->default(Status::where('name', 'Pending')->first()->id)
                        ->hiddenOn(['create','edit']),
                       // ->hiddenOn('create',),
                        // ->disabled(!auth()->user()->can('status_expense')),


It shows up as null on the table
Was this page helpful?