improve import / export flow and clean up relationships
This commit is contained in:
hackerESQ
2024-08-28 22:06:47 -05:00
parent e684c1f4a3
commit 69c43dc41f
15 changed files with 104 additions and 74 deletions
+9
View File
@@ -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()
{