mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
Swithced the main nav to a mobile layout to cut down on complex responsive styling to make the heaader work. Also began touching up site wide responsive styles so the site works on multiple devices.
36 lines
955 B
PHP
36 lines
955 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
class ExportController extends Controller
|
|
{
|
|
//
|
|
public function exportCSV()
|
|
{
|
|
/*
|
|
$columns = [
|
|
'id',
|
|
'product_name',
|
|
'product_url',
|
|
'price',
|
|
'category'
|
|
];
|
|
|
|
$products = [
|
|
[1, 'product 1', 'https://example.com/product-1', '9.99', 'category 1'],
|
|
[2, 'product 2', 'https://example.com/product-2', '19.99', 'category 2'],
|
|
[3, 'product 3', 'https://example.com/product-3', '29.99', 'category 3'],
|
|
[4, 'product 4', 'https://example.com/product-4', '39.99', 'category 4'],
|
|
];
|
|
|
|
header('Content-Type: text/csv');
|
|
header('Content-Disposition: attachment; filename="products.csv"');
|
|
|
|
echo implode(',', $columns) . PHP_EOL;
|
|
foreach ($products as $product) {
|
|
echo implode(',', $product) . PHP_EOL;
|
|
}
|
|
*/
|
|
}
|
|
}
|