diff --git a/src/Controller/Admin/CommentCrudController.php b/src/Controller/Admin/CommentCrudController.php index ffaf3f2..e9fdbaa 100644 --- a/src/Controller/Admin/CommentCrudController.php +++ b/src/Controller/Admin/CommentCrudController.php @@ -10,6 +10,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField; use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField; use EasyCorp\Bundle\EasyAdminBundle\Field\EmailField; use EasyCorp\Bundle\EasyAdminBundle\Field\IdField; +use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField; use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField; use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField; use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; @@ -46,7 +47,9 @@ class CommentCrudController extends AbstractCrudController yield TextareaField::new('text') ->hideOnIndex() ; - yield TextField::new('photoFilename') + yield ImageField::new('photoFilename') + ->setBasePath('/uploads/photos') + ->setLabel('Photo') ->onlyOnIndex() ;