vitorhugoro1 / laravel-dashboard-stocks-tile
:package_description
Requires
- php: ^7.4
- guzzlehttp/guzzle: ^7.0
- scheb/yahoo-finance-api: ^4.0
- spatie/laravel-dashboard: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-03-29 00:37:57 UTC
README
A tile who fetch stock data price information from Yahoo Finance!
This tile can be used on the Laravel Dashboard.
Installation
You can install the package via composer:
composer require vitorhugoro1/laravel-dashboard-stocks-tile
Usage
In the dashboard
config file, you must add this configuration in the tiles
key.
// in config/dashboard.php return [ // ... 'tiles' => [ 'stocks_data' => [ 'stocks' => [ 'AAPL' // Use the yahoo stock symbols format ], 'refresh_interval_in_seconds' => 60, ], ], ];
In app\Console\Kernel.php you should schedule the VitorHugoRo\StockTile\Commands\FetchStockDataCommand to run every minute.
In your dashboard view you use the livewire:stock-tile
component.
<x-dashboard> <livewire:stock-tile position="e7:e16"/> </x-dashboard>
Todo items
- Adding custom title to tile component
- Make tests to livewire tile
- Make tests to data fetch
- Make an self Yahoo Finance crawler instead of using third party libs.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email vitorhugo.ro10@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.