PHPStorm Giving Error For Not Closing Input on Same Line
Answered
Good Morning!
I'm working with Laravel using PHPStorm. I'm displaying currently selected checkboxes (tags) that are attached to a post. When I break from the input, PHPStorm gives and error because I'm not closing the input on the same line. It gives the error "Tag Start is not closed". I do close it, but on a seperate line. Here's code.
// code
<div class="col-lg-6 ">
<div class="checkbox">
<label><input type="checkbox" name="tags[]" value="{{ $tag->id }}"
@foreach($posts->tags as $t)
@if($tag->id == $t->id)
<!-- we add the 'checked' attribute to the input element -->
checked
@endif
@endforeach
>{{ $tag->tag }}</label>
</div>
</div>
// visual

As you can see, I close the <input> a few lines below. Is there a way to override this particular error?
Please sign in to leave a comment.
Hello,
You need to use Blade comment instead of HTML comment
{{--we add the 'checked' attribute to the input element--}}Awesome! tyvm!