including working export button
This commit is contained in:
hackerESQ
2024-08-27 22:06:10 -05:00
parent e21814714d
commit 12f3003a3a
16 changed files with 39 additions and 164 deletions
-7
View File
@@ -35,8 +35,6 @@ class Portfolio extends Model
protected $with = ['users', 'transactions'];
protected $appends = ['owner_id'];
public function users()
{
return $this->belongsToMany(User::class)->withPivot('owner');
@@ -69,11 +67,6 @@ class Portfolio extends Model
return $this->hasMany(DailyChange::class);
}
public function scopeMyPortfolios()
{
return $this->whereRelation('users', 'id', auth()->user()->id);
}
public function scopeWithoutWishlists()
{
return $this->where(['wishlist' => false]);