Use Template Helpers
Prerequisites
Building Forms
Basic Form
{{ form_tag("/users", method="post") }}
{{ csrf_field() }}
{{ label_tag("user_name", "Name") }}
{{ text_field("user", "name", required=true) }}
{{ label_tag("user_email", "Email") }}
{{ email_field("user", "email", required=true) }}
{{ submit_button("Create User") }}
{{ end_form() }}Form with File Upload
Form with Validation Styles
Select Dropdown
Checkbox and Radio Buttons
Navigation with Active States
Basic Navigation
With Conditional Active Class
External Links
Delete Buttons with Confirmation
Using Type-Safe Endpoint Helpers
Link Helpers for Endpoints
Form Helpers for Endpoints
Delete Buttons with Endpoint Helpers
Complete CRUD Example
Working with Assets
Page Head Section
Scripts at End of Body
Responsive Images
Internationalization
Setup Locale Files
Using Translations
Formatting Dates
Language Switcher
Formatting Numbers and Dates
Currency and Numbers
Relative Times
Custom Date Formats
Safe HTML Output
Escaping HTML (Default)
Marking Content as Safe
Auto-linking URLs
Highlighting Search Terms
Complete Page Example
See Also
Last updated
Was this helpful?
