Skip to content

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Jul 8, 2022

Closes #43102

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

 <input type='email' name="email" @required( !auth()->user()->is_admin )>
 <input type='password' name="password" @required( !auth()->user()->is_admin )>

I will add it on laravel/docs if it is merged

@erikn69 erikn69 changed the title Added required directive [9.x] Added required directive Jul 8, 2022
@taylorotwell taylorotwell merged commit e0b44d1 into laravel:9.x Jul 11, 2022
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.

2 participants