title: laravel : Error Call to a member function all() on array
body: <p>This is used to export excel</p>
  <p>My controllers:</p>
  <pre><code>public function reportExport(Request $request)
  {
      return Excel::download(new ReportExport($request), 'LAPORAN ABSENSI.xlsx');
  }
  </code></pre>
  <p>Export folder : ReportExport</p>
  <pre><code>return [
      &quot;att_cross&quot; =&gt; $att_cross,
      &quot;belum_absen&quot; =&gt; $belum_absen,
      &quot;absen&quot; =&gt; $absen,
  ];
  </code></pre>
  <p>but, when I return one of the data is successful, for example :</p>
  <pre><code>return $absen;
  </code></pre>
  <p>I want to display the contents of the variable $absent, $belum_absen, $att_cross but I get an error message &quot;Call to a member function all() on array &quot;
  how can I display the data for these three parameters?</p>