Get rid of unused functions in controllers
MODIFY
app/Http/Controllers/BudgetsController.php
app/Http/Controllers/BudgetsController.php
@@ -27,10 +27,4 @@ class BudgetsController extends Controller {
return redirect('/budgets');
}
-
- public function destroy($id) {
- Budget::destroy($id);
-
- return redirect('/budgets');
- }
}

MODIFY
app/Http/Controllers/EarningsController.php
app/Http/Controllers/EarningsController.php
@@ -9,12 +9,6 @@ use App\Earning;
use Auth;
class EarningsController extends Controller {
- public function show($id) {
- $earning = Earning::find($id);
-
- return view('earnings.show', compact('earning'));
- }
-
public function create() {
return view('earnings.create');
}
@@ -35,10 +29,4 @@ class EarningsController extends Controller {
return redirect()->route('dashboard.index');
}
-
- public function destroy($id) {
- Earning::destroy($id);
-
- return redirect('/earnings');
- }
}

MODIFY
app/Http/Controllers/SpendingsController.php
app/Http/Controllers/SpendingsController.php
@@ -10,16 +10,6 @@ use App\Tag;
use Auth;
class SpendingsController extends Controller {
- public function show($id) {
- $user = Auth::user();
-
- $currency = $user->currency;
-
- $spending = Spending::find($id);
-
- return view('spendings.show', compact('currency', 'spending'));
- }
-
public function create() {
$tags = Tag::where('user_id', Auth::user()->id)->get();
@@ -44,10 +34,4 @@ class SpendingsController extends Controller {
return redirect()->route('dashboard.index');
}
-
- public function destroy($id) {
- Spending::destroy($id);
-
- return redirect('/spendings');
- }
}

MODIFY
app/Http/Controllers/TagsController.php
app/Http/Controllers/TagsController.php
@@ -28,26 +28,4 @@ class TagsController extends Controller {
return redirect('/tags');
}
-
- public function edit($id) {
- $tag = Tag::find($id);
-
- return view('tags.edit', compact('tag'));
- }
-
- public function update(Request $request, $id) {
- $tag = Tag::find($id);
-
- $tag->name = $request->name;
-
- $tag->save();
-
- return redirect('/tags');
- }
-
- public function destroy($id) {
- Tag::destroy($id);
-
- return redirect('/tags');
- }
}

Get rid of unused functions in controllers