Mini Library Course #9: Book CRUD in EasyAdmin: Fields, Relations, Files & Images

The Book entity is the heart of the project. In this chapter we configure every field of BookCrudController: text, relations, slug, the PDF file, the cover image, and the archived flag. What you'll learn Configure required text fields and rich text Link entities with AssociationField and __toString() Generate a slug automatically Upload a PDF with FileField and a cover with ImageField Generate the controller as for the others (symfony console make:admin:crud, then choose Book), add it to the menu, and let’s fill configureFields(). ...

November 18, 2026 · 4 min · 756 words · Naimi

Mini Library Course #11: File Uploads Done Right in EasyAdmin

We left two problems open: the file paths aren’t saved, and deleted books leave their files on disk. There’s also a hidden bug in our “year_month” folder system. This chapter fixes all three. What you'll learn Spot the hidden bug of a path computed at display time Save each file’s path in the database at upload time Override persistEntity, updateEntity and deleteEntity Delete old files without any risk of data loss The Hidden Bug in Our Path System In chapter 9, we computed the upload folder from the current date, directly in configureFields(): ...

November 18, 2026 · 5 min · 938 words · Naimi

Mini Library Course #12: Fix Required File Fields in EasyAdmin & Add Custom CSS

Last chapter ended with a challenge: our file and image fields are required, so when you edit a book, EasyAdmin complains they’re empty, even though the files exist. This is a classic EasyAdmin gotcha. Let’s fix it properly, then clean up the admin’s styling with a custom CSS file. What you'll learn ...

November 18, 2026 · 3 min · 512 words · Naimi