wip
This commit is contained in:
@@ -42,9 +42,9 @@ class DailyChange extends Model
|
|||||||
return $query->where('daily_change.portfolio_id', $portfolio);
|
return $query->where('daily_change.portfolio_id', $portfolio);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeMyDailyChanges()
|
public function scopeMyDailyChanges($query)
|
||||||
{
|
{
|
||||||
return $this->whereHas('portfolio', function ($query) {
|
return $query->whereHas('portfolio', function ($query) {
|
||||||
$query->whereHas('users', function ($query) {
|
$query->whereHas('users', function ($query) {
|
||||||
return $query->where('id', auth()->id());
|
return $query->where('id', auth()->id());
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -218,6 +218,9 @@ class Portfolio extends Model
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cache()->forget('graph-YTD-'.$this->id);
|
||||||
|
cache()->forget('graph-YTD-'.request()->user()->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getMostRecentCloseData($history, $date, $i = 0, $max_attempts = 5)
|
protected function getMostRecentCloseData($history, $date, $i = 0, $max_attempts = 5)
|
||||||
|
|||||||
Reference in New Issue
Block a user