mock up import export

This commit is contained in:
hackerESQ
2024-08-07 18:29:23 -05:00
parent b090908d09
commit 991d484152
19 changed files with 1085 additions and 2 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace App\Exports\Sheets;
use App\Models\DailyChange;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class DailyChangesSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'Date',
'User',
'Total Market Value',
'Total Cost Basis',
'Total Gain Loss',
'Total Dividends',
'Realized Gains',
'Notes'
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return DailyChange::myDailyChanges()->get();
}
/**
* @return string
*/
public function title(): string
{
return 'Daily Changes';
}
}