title: Conditional Blade component slots
body: <p>I have a Blade component called persons, that has different slots I'd like to fill.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="person"&gt;
    &lt;img src="{{ $image_url }}" alt="{{ $image_alt }}"&gt;
    {{ $name }}
    {{ $information }}
    &lt;a class="button button-primary" href="{{ $link }}" target="_blank"&gt;Homepage&lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And I have various template files, where I'm doing a foreach and I'd like to use the persons component to show the info.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@if ($persons)
    @foreach ($persons as $person)
      @component('components.person')
        @slot('image_url')
          {{ $person['person_image'] }}
        @endslot
  
        @slot('name')
          {{ $person['person_name'] }}
        @endslot
  
        @slot('information')
          {!! $person['person_information'] !!}
        @endslot
  
        @slot('link')
          {{ $person['person_link'] }}
        @endslot
      @endcomponent
    @endforeach
  @endif</code></pre>
  </div>
  </div>
  </p>
  
  <p>Sometimes some fields might be empty. For example, sometimes somebody doesn't have an image or a homepage and in that case I'd wouldn't want to show that empty field on the homepage.</p>
  
  <p>Logic says that I should add issset() or empty() into my component file, like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="person"&gt;
    @empty ($image_url)
      &lt;img src="{{ $image_url }}" alt="{{ $image_alt }}"&gt;
    @endempty
    
    @isset ($name)
      {{ $name }}
    @endisset
    
    @isset ($information)
      {{ $information }}
    @endisset
    
    @isset ($link)
      &lt;a class="button button-primary" href="{{ $link }}" target="_blank"&gt;Homepage&lt;/a&gt;
    @endisset  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But this doesn't seem to work at all. It either removes everything or nothing at all ( depending on if using @isset() or @empty() ).</p>
  
  <p>So my question is: Is it possible to fill component slots conditionally in a foreach loop?</p>