improve import / export flow and clean up relationships
This commit is contained in:
hackerESQ
2024-08-28 22:06:47 -05:00
parent e684c1f4a3
commit 69c43dc41f
15 changed files with 104 additions and 74 deletions
+5 -11
View File
@@ -2,10 +2,11 @@
namespace App\Exports\Sheets;
use App\Models\Portfolio;
use App\Models\Transaction;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
class TransactionsSheet implements FromCollection, WithHeadings, WithTitle
{
@@ -22,14 +23,7 @@ class TransactionsSheet implements FromCollection, WithHeadings, WithTitle
'Split',
'Date',
'Created',
'Updated',
'Company Name',
'Portfolio Title',
'Market Value',
'52 Week Low',
'52 Week High',
'Market Data Refresh Date',
'Gain/Loss Dollars'
'Updated'
];
}
@@ -38,7 +32,7 @@ class TransactionsSheet implements FromCollection, WithHeadings, WithTitle
*/
public function collection()
{
return auth()->user()->transactions;
return Transaction::myTransactions()->get();
}
/**