Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Disabled directive documentation #7690

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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