add empty data help text

This commit is contained in:
hackerESQ
2024-09-06 23:15:43 -05:00
parent d911d05e9a
commit 96a408b32d
7 changed files with 76 additions and 10 deletions
+15
View File
@@ -110,6 +110,21 @@ class Transaction extends Model
return $query->where('symbol', $symbol);
}
public function scopeBuy($query)
{
return $query->where('transaction_type', 'BUY');
}
public function scopeSell($query)
{
return $query->where('transaction_type', 'SELL');
}
public function scopeBeforeDate($query, $date)
{
return $query->whereDate('date', '<', $date);
}
public function scopeMyTransactions()
{
return $this->whereHas('portfolio', function ($query) {