TextInput::make('comment') ->default(function ($record) { // Set default value based on existing 'comment' attribute or a random string return $record->comment ?? Str::random(8); }),
SelectFilter::make('author')->relationship('user', 'name')->query(function (Builder $query, array $data): Builder {return $query ->when( $data['value'], fn (Builder $query, $userid): Builder => $query->where('user_id',$userid), );}),