Skip to content

Commit

Permalink
[9.x] Disabled directive documentation (#7690)
Browse files Browse the repository at this point in the history
* Disabled directive documentation

* formatting

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
belzaaron and taylorotwell authored Feb 15, 2022
1 parent 4d525b7 commit 8bdfaed
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions blade.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [Loops](#loops)
- [The Loop Variable](#the-loop-variable)
- [Conditional Classes](#conditional-classes)
- [Checked / Selected](#checked-and-selected)
- [Checked / Selected / Disabled](#checked-and-selected)
- [Including Subviews](#including-subviews)
- [The `@once` Directive](#the-once-directive)
- [Raw PHP](#raw-php)
Expand Down Expand Up @@ -434,7 +434,7 @@ The `@class` directive conditionally compiles a CSS class string. The directive
```

<a name="checked-and-selected"></a>
### Checked / Selected
### Checked / Selected / Disabled

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`:

Expand All @@ -457,6 +457,12 @@ Likewise, the `@selected` directive may be used to indicate if a given select op
</select>
```

Additionally, the `@disabled` directive may be used to indicate if a given element should be "disabled":

```blade
<button type="submit" @disabled($errors->isNotEmpty())>Submit</button>
```

<a name="including-subviews"></a>
### Including Subviews

Expand Down

0 comments on commit 8bdfaed

Please sign in to comment.