From 3e159904c68493e98de27345936f1acdd16764f9 Mon Sep 17 00:00:00 2001 From: Mahmoud Mohamed Ramadan <48416569+mahmoudmohamedramadan@users.noreply.github.com> Date: Sat, 16 Jul 2022 20:32:05 +0200 Subject: [PATCH] Updates `attributes checking` section --- blade.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blade.md b/blade.md index 2f752eac37a..0078bcd5ac2 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) + - [Attributes Checking](#attributes-checking) - [Including Subviews](#including-subviews) - [The `@once` Directive](#the-once-directive) - [Raw PHP](#raw-php) @@ -437,8 +437,8 @@ The `@class` directive conditionally compiles a CSS class string. The directive ``` - -### Checked / Selected / Disabled + +### Attributes Checking 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`: @@ -467,6 +467,12 @@ Additionally, the `@disabled` directive may be used to indicate if a given eleme ``` +Moreover, the `@readonly` directive may be used to indicate if a given element should be "readonly": + +```blade +isNotAdmin()) /> +``` + In addition, the `@required` directive may be used to indicate if a given element should be "required": ```blade