Download the PHP package eugene-melbourne/laravel-csv-generator without Composer
On this page you can find all versions of the php package eugene-melbourne/laravel-csv-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download eugene-melbourne/laravel-csv-generator
More information about eugene-melbourne/laravel-csv-generator
Files in eugene-melbourne/laravel-csv-generator
Download eugene-melbourne/laravel-csv-generator
More information about eugene-melbourne/laravel-csv-generator
Files in eugene-melbourne/laravel-csv-generator
Vendor eugene-melbourne
Package laravel-csv-generator
Short Description CSV export in laravel 5, 6, 7, 8, 9
License MIT
Package laravel-csv-generator
Short Description CSV export in laravel 5, 6, 7, 8, 9
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-csv-generator
LaravelCsvGenerator
Helps download *.csv files from your laravel project.
Installation
$ composer require eugene-melbourne/laravel-csv-generator
example of use in your controller
class MyController extends Controller
{
public function getCsv(): \Symfony\Component\HttpFoundation\StreamedResponse
{
$data = [
[1, 2.1],
[3, "hi, there"],
];
$headers = ['one', 'two'];
$data = array_merge([$headers], $data);
return (new \LaravelCsvGenerator\LaravelCsvGenerator())
->setData($data)
->renderStream();
}
set your own http headers with ->setHttpHeaders(array $httpHeaders)
get csv as string ->toString()
More examples in routes/web.php
Tested with Laravel 5.7, 5.8, 6.4
All versions of laravel-csv-generator with dependencies
PHP Build Version
Package Version
The package eugene-melbourne/laravel-csv-generator contains the following files
Loading the files please wait ....