empty) { return $configs; } // collect user settings $configs->push([ 'key' => 'name', 'value' => auth()->user()->name, ], [ 'key' => 'locale', 'value' => auth()->user()->getLocale(), ], [ 'key' => 'display_currency', 'value' => auth()->user()->getCurrency(), ]); // reinvested holdings $reinvested_holdings = Holding::myHoldings()->where('reinvest_dividends', true)->get(['portfolio_id', 'symbol']); if ($reinvested_holdings->isNotEmpty()) { $configs->push([ 'key' => 'reinvested_dividends', 'value' => $reinvested_holdings->toJson(), ]); } return $configs; } public function title(): string { return 'Config'; } }