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
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Exports;
use App\Exports\Sheets\DailyChangesSheet;
use App\Exports\Sheets\SplitsSheet;
use App\Exports\Sheets\DividendsSheet;
use App\Exports\Sheets\MarketDataSheet;
use App\Exports\Sheets\PortfoliosSheet;
use App\Exports\Sheets\TransactionsSheet;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class BackupExport implements WithMultipleSheets
{
use Exportable;
/**
* @return array
*/
public function sheets(): array
{
return [
new PortfoliosSheet,
new TransactionsSheet,
new MarketDataSheet,
new DividendsSheet,
new SplitsSheet,
new DailyChangesSheet
];
}
}
+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';
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Exports\Sheets;
use App\Models\Dividend;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class DividendsSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'ID',
'Date',
'Symbol',
'Amount',
'Created',
'Updated',
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return Dividend::get();
}
/**
* @return string
*/
public function title(): string
{
return 'Dividends';
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Exports\Sheets;
use App\Models\MarketData;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class MarketDataSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'Symbol',
'Name',
'Market Value',
'52 Week Low',
'52 Week High',
'Dividend Date',
'Splits Synced To Holdings At',
'Created',
'Updated',
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return MarketData::get();
}
/**
* @return string
*/
public function title(): string
{
return 'Market Data';
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Exports\Sheets;
use App\Models\Portfolio;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class PortfoliosSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'ID',
'Title',
'Notes',
'Wishlist',
'Created',
'Updated',
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return Portfolio::myPortfolios()->get();
}
/**
* @return string
*/
public function title(): string
{
return 'Portfolios';
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Exports\Sheets;
use App\Models\Split;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class SplitsSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'ID',
'Date',
'Symbol',
'Split',
'Created',
'Updated',
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return Split::get();
}
/**
* @return string
*/
public function title(): string
{
return 'Splits';
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Exports\Sheets;
use App\Models\Transaction;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class TransactionsSheet implements FromCollection, WithHeadings, WithTitle
{
public function headings(): array
{
return [
'ID',
'Symbol',
'Portfolio',
'Transaction',
'Quantity',
'Cost Basis',
'Sale Price',
'Split',
'Date',
'Created',
'Updated',
];
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return Transaction::myTransactions()->get();
}
/**
* @return string
*/
public function title(): string
{
return 'Transactions';
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Imports;
use App\Imports\Sheets\SplitsSheet;
use App\Imports\Sheets\DividendsSheet;
use App\Imports\Sheets\DailyChangesSheet;
use App\Imports\Sheets\MarketDataSheet;
use App\Imports\Sheets\PortfoliosSheet;
use App\Imports\Sheets\TransactionsSheet;
use Maatwebsite\Excel\Concerns\Importable;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class BackupImport implements WithMultipleSheets
{
use Importable;
public function sheets(): array
{
return [
'Portfolios' => new PortfoliosSheet,
'Transactions' => new TransactionsSheet,
'Market Data' => new MarketDataSheet,
'Dividends' => new DividendsSheet,
'Splits' => new SplitsSheet,
'Daily Changes' => new DailyChangesSheet,
];
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Imports\Sheets;
use App\Models\DailyChange;
use Exception;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class DailyChangesSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $dailyChanges)
{
foreach ($dailyChanges->sortBy('date') as $row) {
if ($row['user'] != auth()->user()->id) {
throw new Exception('Can\'t do that.');
}
DailyChange::updateOrCreate([
'date' => $row['date'],
'user_id' => $row['user'],
],[
'user_id' => $row['user'],
'date' => $row['date'],
'total_market_value' => $row['total_market_value'],
'total_cost_basis' => $row['total_cost_basis'],
'total_gain_loss' => $row['total_gain_loss'],
'total_dividends' => $row['total_dividends'],
'realized_gains' => $row['realized_gains'],
'notes' => $row['notes'],
]);
}
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Imports\Sheets;
use App\Models\Dividend;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class DividendsSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $dividend)
{
foreach ($dividend->sortBy('date') as $row) {
Dividend::updateOrCreate([
'symbol' => $row['symbol'],
'date' => $row['date'],
],[
'symbol' => $row['symbol'],
'dividend_amount' => $row['amount'] ?? 0,
'date' => $row['date'],
]);
}
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Imports\Sheets;
use App\Models\MarketData;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class MarketDataSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $market_data)
{
foreach ($market_data->sortBy('symbol') as $row) {
MarketData::updateOrCreate(
[
'symbol' => $row['symbol']
],
[
'symbol' => $row['symbol'],
'name' => $row['name'],
'market_value' => $row['market_value'],
'fifty_two_week_low' => $row['52_week_low'],
'fifty_two_week_high' => $row['52_week_high'],
'dividend_date' => $row['dividend_date'],
'splits_synced_to_holdings_at' => $row['splits_synced_to_holdings_at']
]
);
}
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Imports\Sheets;
use App\Models\Portfolio;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class PortfoliosSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $portfolios)
{
foreach ($portfolios->sortBy('date') as $row) {
Portfolio::myPortfolios()
->where(['id' => $row['id']])
->orWhere(['title' => $row['title']])
->firstOr(function () use ($row) {
return Portfolio::make()->forceFill([
'id' => $row['id'] ?? null,
'title' => $row['title'],
'wishlist' => $row['wishlist'] ?? false,
'notes' => $row['notes'],
])->save();
});
}
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Imports\Sheets;
use App\Models\Split;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class SplitsSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $dividend)
{
foreach ($dividend->sortBy('date') as $row) {
Split::updateOrCreate([
'symbol' => $row['symbol'],
'date' => $row['date'],
],[
'symbol' => $row['symbol'],
'split_amount' => $row['split'],
'date' => $row['date'],
]);
}
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Imports\Sheets;
use App\Models\Transaction;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\SkipsEmptyRows;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class TransactionsSheet implements ToCollection, WithHeadingRow, SkipsEmptyRows
{
// use Importable;
public function collection(Collection $transactions)
{
foreach ($transactions->sortBy('date') as $row) {
Transaction::updateOrCreate([
'id' => $row['id'],
],[
'id' => $row['id'],
'symbol' => $row['symbol'],
'portfolio_id' => $row['portfolio'],
'transaction_type' => $row['transaction'],
'quantity' => $row['quantity'],
'cost_basis' => $row['cost_basis'] ?? 0,
'sale_price' => $row['sale_price'],
'split' => $row['split'] ?? null,
'date' => $row['date'],
]);
}
}
}
+1
View File
@@ -12,6 +12,7 @@
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.5",
"livewire/volt": "^1.6",
"maatwebsite/excel": "^3.1",
"predis/predis": "^2.2",
"robsontenorio/mary": "^1.35"
},
Generated
+517 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "75dbf3792262a2f37c90e8a963f8c601",
"content-hash": "4dcc44afdbd155cb01d0e00deb3bb4fe",
"packages": [
{
"name": "bacon/bacon-qr-code",
@@ -339,6 +339,87 @@
],
"time": "2024-02-09T16:56:22+00:00"
},
{
"name": "composer/semver",
"version": "3.4.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6",
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.4",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2024-07-12T11:35:52+00:00"
},
{
"name": "dasprid/enum",
"version": "1.0.5",
@@ -760,6 +841,67 @@
],
"time": "2023-10-06T06:47:41+00:00"
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.17.0",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c",
"reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c",
"shasum": ""
},
"require": {
"php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
},
"require-dev": {
"cerdic/css-tidy": "^1.7 || ^2.0",
"simpletest/simpletest": "dev-master"
},
"suggest": {
"cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.",
"ext-bcmath": "Used for unit conversion and imagecrash protection",
"ext-iconv": "Converts text to and from non-UTF-8 encodings",
"ext-tidy": "Used for pretty-printing HTML"
},
"type": "library",
"autoload": {
"files": [
"library/HTMLPurifier.composer.php"
],
"psr-0": {
"HTMLPurifier": "library/"
},
"exclude-from-classmap": [
"/library/HTMLPurifier/Language/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1-or-later"
],
"authors": [
{
"name": "Edward Z. Yang",
"email": "admin@htmlpurifier.org",
"homepage": "http://ezyang.com"
}
],
"description": "Standards compliant HTML filter written in PHP",
"homepage": "http://htmlpurifier.org/",
"keywords": [
"html"
],
"support": {
"issues": "https://github.com/ezyang/htmlpurifier/issues",
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0"
},
"time": "2023-11-17T15:01:25+00:00"
},
{
"name": "fruitcake/php-cors",
"version": "v1.3.0",
@@ -2651,6 +2793,275 @@
},
"time": "2024-05-31T19:07:20+00:00"
},
{
"name": "maatwebsite/excel",
"version": "3.1.55",
"source": {
"type": "git",
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
"reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260",
"reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260",
"shasum": ""
},
"require": {
"composer/semver": "^3.3",
"ext-json": "*",
"illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0",
"php": "^7.0||^8.0",
"phpoffice/phpspreadsheet": "^1.18",
"psr/simple-cache": "^1.0||^2.0||^3.0"
},
"require-dev": {
"laravel/scout": "^7.0||^8.0||^9.0||^10.0",
"orchestra/testbench": "^6.0||^7.0||^8.0||^9.0",
"predis/predis": "^1.1"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Maatwebsite\\Excel\\ExcelServiceProvider"
],
"aliases": {
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
}
}
},
"autoload": {
"psr-4": {
"Maatwebsite\\Excel\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Patrick Brouwers",
"email": "patrick@spartner.nl"
}
],
"description": "Supercharged Excel exports and imports in Laravel",
"keywords": [
"PHPExcel",
"batch",
"csv",
"excel",
"export",
"import",
"laravel",
"php",
"phpspreadsheet"
],
"support": {
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.55"
},
"funding": [
{
"url": "https://laravel-excel.com/commercial-support",
"type": "custom"
},
{
"url": "https://github.com/patrickbrouwers",
"type": "github"
}
],
"time": "2024-02-20T08:27:10+00:00"
},
{
"name": "maennchen/zipstream-php",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php-64bit": "^8.1"
},
"require-dev": {
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.16",
"guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpunit": "^10.0",
"vimeo/psalm": "^5.0"
},
"suggest": {
"guzzlehttp/psr7": "^2.4",
"psr/http-message": "^2.0"
},
"type": "library",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
},
{
"url": "https://opencollective.com/zipstream",
"type": "open_collective"
}
],
"time": "2023-06-21T14:59:35+00:00"
},
{
"name": "markbaker/complex",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
},
"time": "2022-12-06T16:21:08+00:00"
},
{
"name": "markbaker/matrix",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@demon-angel.eu"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
},
"time": "2022-12-02T22:17:43+00:00"
},
{
"name": "mobiledetect/mobiledetectlib",
"version": "4.8.06",
@@ -3283,6 +3694,111 @@
},
"time": "2024-05-08T12:18:48+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.29.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.15",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^7.4 || ^8.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^1.0 || ^2.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0 || ^10.0",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"ext-intl": "PHP Internationalization Functions",
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"type": "library",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
},
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0"
},
"time": "2023-06-14T22:48:31+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.3",
@@ -38,7 +38,7 @@
</x-slot:trigger>
<x-menu-item title="{{ __('Manage Profile') }}" icon="o-user" link="{{ @route('profile.show') }}" />
<x-menu-item title="{{ __('Import / Export Data') }}" icon="o-cloud-arrow-down" link="{{ @route('profile.show') }}" />
<x-menu-item title="{{ __('Import / Export Data') }}" icon="o-cloud-arrow-down" link="{{ @route('import-export') }}" />
<x-menu-separator />
+61
View File
@@ -0,0 +1,61 @@
<x-app-layout>
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<x-forms.form-section submit="updateProfileInformation">
<x-slot name="title">
{{ __('Import') }}
</x-slot>
<x-slot name="description">
{{ __('Upload or recover your Investbrain portfolio and holdings.') }}
</x-slot>
<x-slot name="form">
<!-- Name -->
<div class="col-span-6 sm:col-span-4">
{{-- <x-file wire:model="file" label="Receipt" hint="Only PDF" accept="application/pdf" /> --}}
<input type="file" />
</div>
</x-slot>
<x-slot name="actions">
<x-button type="submit">
{{ __('Save') }}
</x-button>
</x-slot>
</x-forms.form-section>
<x-section-border />
</div>
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<x-forms.action-section submit="updateProfileInformation">
<x-slot name="title">
{{ __('Export') }}
</x-slot>
<x-slot name="description">
{{ __('Download all of your portfolios and transactions.') }}
</x-slot>
<x-slot name="content">
<!-- Name -->
<div class="col-span-6 sm:col-span-4">
<x-button type="submit">
{{ __('Download Export') }}
</x-button>
</div>
</x-slot>
</x-forms.form-section>
</div>
</x-app-layout>
+1
View File
@@ -11,6 +11,7 @@ Route::get('/', function () {
Route::middleware(['auth:sanctum', config('jetstream.auth_session'), 'verified'])->group(function () {
Route::get('/dashboard', [DashboardController::class, 'show'])->name('dashboard');
Route::view('/import-export', 'import-export')->name('import-export');
Route::get('/portfolio/create', [PortfolioController::class, 'create'])->name('portfolio.create');
Route::get('/portfolio/{portfolio}', [PortfolioController::class, 'show'])->name('portfolio.show');