PHP code example of waxwink / report

1. Go to this page and download the library: Download waxwink/report library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

waxwink / report example snippets


use Illuminate\Support\Collection;
use Waxwink\Report\Excel;

'price'=> 'Price',
];

$collection = new Collection([
    [
        'id'=> '1574',
        'name'=> 'Phone',
        'price'=> '100',],
    [
        'id'=> '6541',
        'name'=> 'Printer',
        'price'=> '150',
    ],
    [
        'id'=> '9652',
        'name'=> 'Laptop',
        'price'=> '350',
    ],
    [
        'id'=> '6971',
        'name'=> 'Mouse',
        'price'=> '30',
    ]
]);

$xl = new Excel($collection, $keys);

//this would save the file in the root folder : table.xlsx
$xl->export('table');


// (works only if you're using laravel)
return response()->download($xl->update());