Posted 4 months ago by davy_yg


I wonder how the export command works in laravel?

I am following this tutorial: https://laravel-excel.maatwebsite.nl/3.0/exports/

and still do not understand how to export this data:

public function listReport(Request $request) {

        $report = ReportModel::leftJoin('tb_m_biller_solusi', function($join){
                $join->on('tb_r_solusiorder.productid', '=', 'tb_m_biller_solusi.Productid');
                $join->on('tb_r_solusiorder.billerid', '=', 'tb_m_biller_solusi.Billerid');            
            ->leftJoin('tb_m_biller', 'tb_r_solusiorder.billerid', '=', 'tb_m_biller.biller_id')        

            return view('pages.report.list')
                ->with('list', $report);

This is the button:


<div class="card mb-3">
        <div class="card-header">
        <div style="float:left">
            <i class="fa fa-table"></i> Reports
        <div style="float:right">
                <a class="btn btn-primary" href="{{ url('/create-report') }}" id="toggleNavColor">
                Export Report

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.