Start your All-Access Pass to unlock this challenge
Which fields will be rendered on the "detail" page of InvoiceCrudController
if you have this config:
class InvoiceCrudController extends AbstractCrudController
{
// ...
public function configureFields(string $pageName): iterable
{
yield IdField::new('id')
->onlyOnIndex();
yield MoneyField::new('total')
->setCurrency('USD');
if ($pageName === 'detail') {
yield EmailField::new('user.email', 'Email');
yield BooleanField::new('wasEmailSent')
->onlyOnIndex()
->renderAsSwitch(false);
}
yield DateField::new('createdAt')
->hideOnForm();
yield DateField::new('paidAt');
}
}