wip
improve import / export flow and clean up relationships
This commit is contained in:
@@ -37,6 +37,15 @@ class DailyChange extends Model
|
||||
{
|
||||
return $query->where('portfolio_id', $portfolio);
|
||||
}
|
||||
|
||||
public function scopeMyDailyChanges()
|
||||
{
|
||||
return $this->whereHas('portfolio', function ($query) {
|
||||
$query->whereHas('users', function ($query) {
|
||||
$query->where('id', auth()->id());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public function portfolio()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user