Add imports for facades

This commit is contained in:
James Cole
2025-02-23 12:47:04 +01:00
parent 0086a0ddc8
commit f7ad9c56c8
43 changed files with 132 additions and 94 deletions

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace FireflyIII\Services\Internal\Destroy;
use FireflyIII\Models\Budget;
use Illuminate\Support\Facades\DB;
/**
* Class BudgetDestroyService
@@ -41,10 +42,10 @@ class BudgetDestroyService
}
// also delete all relations between categories and transaction journals:
\DB::table('budget_transaction_journal')->where('budget_id', $budget->id)->delete();
DB::table('budget_transaction_journal')->where('budget_id', $budget->id)->delete();
// also delete all relations between categories and transactions:
\DB::table('budget_transaction')->where('budget_id', $budget->id)->delete();
DB::table('budget_transaction')->where('budget_id', $budget->id)->delete();
// also delete all budget limits
foreach ($budget->budgetlimits()->get() as $limit) {