Skip to content

vitorhugoro1/laravel-dashboard-stocks-tile

Repository files navigation

Laravel Dashboard Finance Stocks Tile

Latest Version on Packagist Total Downloads

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.