Fix redirects in destroy methods of EarningController and SpendingController
MODIFY
app/Http/Controllers/EarningController.php
app/Http/Controllers/EarningController.php
@@ -76,10 +76,7 @@ class EarningController extends Controller {
$earning->delete();
return redirect()
- ->route('earnings.index')
- ->with([
- 'restorableEarning' => $restorableEarning
- ]);
+ ->route('transactions.index');
}
public function restore($id) {

MODIFY
app/Http/Controllers/SpendingController.php
app/Http/Controllers/SpendingController.php
@@ -74,10 +74,7 @@ class SpendingController extends Controller {
$spending->delete();
return redirect()
- ->route('spendings.index')
- ->with([
- 'restorableSpending' => $restorableSpending
- ]);
+ ->route('transactions.index');
}
public function restore($id) {

Fix redirects in destroy methods of EarningController and SpendingController