From 8abc5b17adb192895bcca208a230477c11d9bbf6 Mon Sep 17 00:00:00 2001 From: erikn69 Date: Mon, 11 Jul 2022 10:28:04 -0500 Subject: [PATCH] Required directive documentation --- blade.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/blade.md b/blade.md index d46c48b8f26..21c0bcdf6fe 100644 --- a/blade.md +++ b/blade.md @@ -10,7 +10,7 @@ - [Loops](#loops) - [The Loop Variable](#the-loop-variable) - [Conditional Classes](#conditional-classes) - - [Checked / Selected / Disabled](#checked-and-selected) + - [Checked / Selected / Disabled / Required](#checked-and-selected) - [Including Subviews](#including-subviews) - [The `@once` Directive](#the-once-directive) - [Raw PHP](#raw-php) @@ -438,7 +438,7 @@ The `@class` directive conditionally compiles a CSS class string. The directive ``` -### Checked / Selected / Disabled +### Checked / Selected / Disabled / Required For convenience, you may use the `@checked` directive to easily indicate if a given HTML checkbox input is "checked". This directive will echo `checked` if the provided condition evaluates to `true`: @@ -461,9 +461,10 @@ Likewise, the `@selected` directive may be used to indicate if a given select op ``` -Additionally, the `@disabled` directive may be used to indicate if a given element should be "disabled": +Additionally, the `@required` or `@disabled` directives may be used to indicate if a given element should be "required" or "disabled" respectively: ```blade +is_admin) /> ```