jeudi 2 novembre 2017

Login in Laravel components

I have a laravel component

<section class="section ">
          <div class="inner">
            <h1></h1>
            <h2></h2>
            <p></p>
           </div>

           
</section>

I render in blade template

 @component('components.section',  ['classes' => 'lightgrey'])
      @slot('heading')
      The best thing ever....
      @endslot
       @slot('subheading')

      @endslot
      @slot('copy')
      Lots of interesting words go here
      @endslot
@endcomponent

Sometime I only have an H1. How can I remove the markup if I do not have a sub heading?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2A9Uxhp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire