I'm using the following code in my form currently:
{{ $errors->has('email') ? ' has-error' : '' }}
I tried changing it to this:
{{ $errors->has('email') ?: ' has-error' }}
But now the class is added even if it has no errors. Why is this happening? Just curious.