feat:adds user option to sync and refresh commands
This commit is contained in:
@@ -14,7 +14,8 @@ class RefreshDividendData extends Command
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'refresh:dividend-data
|
||||
{--force : Refresh all holdings}';
|
||||
{--force : Refresh all holdings}
|
||||
{--user= : Limit refresh to user\'s holdings}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -46,6 +47,10 @@ class RefreshDividendData extends Command
|
||||
$holdings->where('quantity', '>', 0);
|
||||
}
|
||||
|
||||
if ($this->option('user')) {
|
||||
$holdings->myHoldings($this->option('user'));
|
||||
}
|
||||
|
||||
foreach ($holdings->get(['symbol']) as $holding) {
|
||||
$this->line('Refreshing ' . $holding->symbol);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user