Exemplo n.º 1
0
 private static function exportStatementToCsv($results)
 {
     return ["content" => CsvFileService::toCsv($results, '"' . join('","', PayeePayment::$PAYMENT_CSV_HEADER) . '"', '', ','), "content_type" => "text/csv", "filename" => "unpaidStatements.csv"];
 }
Exemplo n.º 2
0
 public static function apiNoEmailUsers()
 {
     $results = PayeeCompany::payeesWithoutEmail()->select(["user.id", "user.name", "user.code", "user.email"])->get()->toArray();
     return ["content" => CsvFileService::toCsv($results, "id,name,code,email,password"), "content_type" => "text/csv", "filename" => "noEmailUsers.csv"];
 }
Exemplo n.º 3
0
 public static function apiCsv()
 {
     $results = self::paymentsPerPayee(Auth::user()["code"])->select(self::downloadHeader())->get()->toArray();
     return ["content" => CsvFileService::toCsv($results, implode(",", self::downloadHeader())), "content_type" => "text/csv", "filename" => "payments.csv"];
 }