Asked by: Diego Alves
I know that there are other question addressing this issue but they mostly cover adding a value to an attribute based on a variable. I want to include several attributes and their values based on a condition.
My first attempt, as you can see below, besides not working is not very readable:
<input
type="text"
{{ $errors->has('bedrooms') ? "data-toggle='tooltip' data-placement='right'
title='please, enter a value between 1 and 9.'" : "" }}
/>
Produces the html:
<input type="text"
data-toggle="tooltip" data-placement="right"
title="please, enter a value between 1 and 9." />
No comments:
Post a Comment