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] Add disabled directive #40900

Merged
merged 1 commit into from Feb 10, 2022
Merged

[9.x] Add disabled directive #40900

merged 1 commit into from Feb 10, 2022

Conversation

belzaaron
Copy link
Contributor

@belzaaron belzaaron commented Feb 9, 2022

This PR provides the use of the common HTML directive disabled through a shorthand syntax via a Blade directive. Allowing developers to have a more enjoyable method of disabling a button, for example, could improve the smooth flow that we Laravel developers are consistently being treated too. Simple yet, effective.

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

Editing for documentation PR: laravel/docs#7690

@belzaaron belzaaron changed the title [9.x] Added disabled directive [9.x] Add disabled directive Feb 9, 2022
@bogdankharchenko
Copy link
Contributor

bogdankharchenko commented Feb 10, 2022

I feel like I've been seeing a few of these new form related blade helpers -- but sometimes I wonder is this ultimately becoming a form builder?

I'm not strongly opposed to this but I wonder if we need these additional blade helpers... @readonly next week?

This is a form builder for example, which uses components/functions to define the form structure in an elegant way instead - maybe this is the solution for some people and it could perhaps could prevent a dozen more PR's for form related directives.
https://github.com/glhd/aire#blade-components

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants