Producing output.
WHAT BLADE IS
Laravel's template engine.
WHAT IT PROVIDES
Value output, escaped by default Conditions and loops Layout inheritance Reusable components Including partial templates
WHY ESCAPING BY DEFAULT MATTERS
The most common web vulnerability is prevented unless you deliberately disable it.
WHAT TO DO WHEN YOU DISABLE IT
Be certain the content is safe, and comment why.
WHAT LAYOUTS PROVIDE
A shared structure that pages fill.
WHAT COMPONENTS PROVIDE
Reusable pieces with their own parameters.
WHAT TO USE COMPONENTS FOR
Anything appearing in several places: buttons, cards, form fields, alerts.
WHY
One definition, changed once.
WHAT TO KEEP OUT OF TEMPLATES
Database queries Business logic Complex calculation
WHY
Logic in a template cannot be tested and hides query multiplication.
WHAT TO PASS IN
Data already prepared.
WHAT TO ORGANISE
Templates by feature, mirroring your routes.