aa
This commit is contained in:
@@ -43,7 +43,9 @@ class ArticleController extends Controller // Should extend AbstractController
|
||||
$csvContent .= $articoloVenduto->idArticolo . ',' . $articoloVenduto->Titolo . ',' . $articoloVenduto->totaleVenduto . "\n"; // Aggiunto il campo Titolo nei dati
|
||||
}
|
||||
|
||||
$response->setContent($csvContent);
|
||||
view('export_articles_sales', ['articoliVenduti' => $articoliVenduti]);
|
||||
|
||||
$response->setContent($csvContent);
|
||||
|
||||
return $response;
|
||||
|
||||
|
||||
32
resources/views/export_articles_sales.blade.php
Normal file
32
resources/views/export_articles_sales.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Articoli Venduti</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-4">
|
||||
<h1 class="mb-4">Articoli Venduti</h1>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id Articolo</th>
|
||||
<th>Titolo</th>
|
||||
<th>Totale Venduto</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($articoliVenduti as $articolo)
|
||||
<tr>
|
||||
<td>{{ $articolo->idArticolo }}</td>
|
||||
<td>{{ $articolo->Titolo }}</td>
|
||||
<td>{{ $articolo->totaleVenduto }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user