title: creating One Blade template and using it in different places
body: <p>Is there any way to use one view blade template in different places and pass to it different variables?
  to be more clear,
  In the main page of my website, there is a section for "new products" and also the same section for "top selling products".</p>
  
  <p>I've created two separate views for those and passed $newProducts array to first blade template and  $topselling to the second view.like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-12 no0-padding"&gt;
          &lt;div class="owl-carousel owl-theme  mt-4"&gt;
              @foreach($topsoldFiles as $file)
                  ...
              @endforeach
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>and</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-12 no0-padding"&gt;
          &lt;div class="owl-carousel owl-theme  mt-4"&gt;
              @foreach($newFiles as $newFile)
                  ...
              @endforeach
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>and finally, I've included these two views in my index.blade.php.</p>
  
  <p>As see, both codes are the same except the variable name that is passed to.
  Is there a better way to have just one file and include it anywhere needed by a related variable name?</p>
  
  <p>Thanks in advance,</p>