/** * Export Transaction Csv (Generated as 'Transaction.csv') */ public function exportTransactionCsv() { $csvData = $this->downloadCsvManager->transactionCsvData(Session::get('org_id')); if (false === $csvData) { return redirect()->back()->withResponse(['messages' => ["It seems you do not have any Activities."], 'type' => 'warning']); } if (null === $csvData && false !== $csvData) { return redirect()->back()->withResponse(['messages' => ["It seems you do not have any Transactions."], 'type' => 'warning']); } $headers = $csvData['headers']; unset($csvData['headers']); $this->generator->generateWithHeaders('transaction', $csvData, $headers); }
/** * Exports the organization details to csv format * @param $organizationDetails */ public function exportDetails($organizationDetails) { $headers = ['Organization Name', 'Admin Email', 'No. of Activities', 'Activity Last Updated At', 'No. of Published activities', 'Organization Data Published', 'Organization Data Last Updated At']; $this->generator->generateWithHeaders("Organization details", $organizationDetails, $headers); }