Laravel Blade条件部分

I want to show in my view one section if conditional is true, other section if it is false. I am using PhpStorm as IDE and what I get in those cases is that directive is not closed:

@if (conditional)
    @section('content')
        ...
    @stop

@else
    @include('pages.something')
@endif

I am getting that opening @if is not closed, and that @else is missing opening directive.

Front-end works fine, but this is really bugging me in IDE. Can it be resolved?

EDIT:

This only happens when using conditionals and sections together. Conditionals and includes work fine.

Try to wrap your content using @yield

See laravel's docs for reference. https://laravel.com/docs/5.5/blade#template-inheritance