You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tips/views.md
+5-26Lines changed: 5 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,34 +42,13 @@ Often, we need to conditionally mark an input as checked. While this can be done
42
42
43
43
## Laravel Tip 💡: The "selected" Blade Directive ([⬆️](#views--blade-tips-cd-))
44
44
45
-
When working with `<select>` elements, you often need to conditionally mark an `<option>` as selected.
46
-
While you can do this manually with a ternary expression, Laravel provides the `@selected` Blade directive 🚀
45
+
When working with select elements, you might need to conditionally mark an option as selected. While you can do this manually, Laravel ships with the "selected" directive to do exactly that 🚀
0 commit comments