title: Laravel - Return 2 views in AJAX response
body: <p>I have a view with 2 <code>@include</code> directives which are subviews for updating data when AJAX call is executed.
  The firt <code>@include</code> is correctly updated in AJAX response but I need to return in the same call the second <code>@include</code> for updating data shown.</p>
  <p>I'm following the approach of <strong>onchange</strong> event to update partial view as following, I believe the approach will be to return also the second partial view and loaded as following: <code>$(&quot;#dashboardindicators&quot;).html(data);</code></p>
  <p><strong>Controller</strong></p>
  <pre><code>if($request-&gt;ajax()){
                  
      return view('pages.dashboard.dashboardindicators', compact('chart4_prop_null','chart4_progress','chart3_prop_null','chart3_progress',
      'chart2_prop_null','chart2_progress','chart1_prop_null','chart1_progress',
      'market_center_dropdown', 'mega_agent_dropdown', 'teams_dropdown'));
  
      
  
  } else {
      return view('pages.dashboard.dashboard', compact('chart4_prop_null','chart4_progress','chart3_prop_null','chart3_progress',
                                              'chart2_prop_null','chart2_progress','chart1_prop_null','chart1_progress',
                                              'market_center_dropdown', 'mega_agent_dropdown', 'teams_dropdown'));
  }
  </code></pre>
  <p><strong>JS</strong></p>
  <pre><code>&lt;script&gt;
      $(document).ready(function () {
      
      $('.dropdown_get').on(&quot;change&quot;, function(){
  
          KTApp.block(&quot;#dashboardindicators&quot;, {
                  overlayColor: &quot;#000000&quot;,
                  type: &quot;v2&quot;,
                  state: &quot;success&quot;,
                  message: &quot;Procesando...&quot;
              }),
          
          $.ajax({
          url: &quot;/dashboard&quot;,
          method: 'GET',
          data: {
              market_center_id: $(&quot;#kt_market_center_dropdown option:selected&quot;).val(),
              mega_agent_id: $(&quot;#kt_mega_agent_dropdown option:selected&quot;).val(),
              team_id: $(&quot;#kt_team_dropdown option:selected&quot;).val(),
          },
          success: function (data) {
              $(&quot;#dashboardindicators&quot;).html(data);
              setTimeout(function () {
                      KTApp.unblock(&quot;#kt_blockui_1_content&quot;)
                  });
               
          }
          });
      });
  });
  &lt;/script&gt;
  </code></pre>