Files
kulakpos_web/Modules/Business/App/Exports/ExportTransaction.php

18 lines
508 B
PHP

<?php
namespace Modules\Business\App\Exports;
use App\Models\DueCollect;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
class ExportTransaction implements FromView
{
public function view(): View
{
return view('business::reports.transaction-history.excel-csv', [
'transactions' => DueCollect::where('business_id', auth()->user()->business_id)->with('party:id,name,type', 'payment_type:id,name', 'transactions')->latest()->get()
]);
}
}