Fix views (singular index to single file instead of seperate directory)
MODIFY
app/Http/Controllers/DashboardController.php
app/Http/Controllers/DashboardController.php
@@ -70,7 +70,7 @@ class DashboardController extends Controller {
$spendingsByTags[$spending->tag->name] += $spending->amount;
}
- return view('dashboard.index', compact(
+ return view('dashboard', compact(
'year',
'month',
'previousYear',

MODIFY
app/Http/Controllers/LoginController.php
app/Http/Controllers/LoginController.php
@@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Auth;
class LoginController extends Controller {
public function index() {
- return view('login.index');
+ return view('login');
}
public function store(Request $request) {

MODIFY
app/Http/Controllers/RegisterController.php
app/Http/Controllers/RegisterController.php
@@ -13,7 +13,7 @@ class RegisterController extends Controller {
public function index() {
$currencies = Currency::all();
- return view('register.index', compact('currencies'));
+ return view('register', compact('currencies'));
}
public function store(Request $request) {

MODIFY
app/Http/Controllers/SearchController.php
app/Http/Controllers/SearchController.php
@@ -25,6 +25,6 @@ class SearchController extends Controller {
$spendings = Spending::where('description', 'like', '%' . $query . '%')->get();
}
- return view('search.index', compact('currency', 'query', 'earnings', 'spendings'));
+ return view('search', compact('currency', 'query', 'earnings', 'spendings'));
}
}

MODIFY
app/Http/Controllers/SettingsController.php
app/Http/Controllers/SettingsController.php
@@ -9,7 +9,7 @@ class SettingsController extends Controller {
public function index() {
$languages = ['en', 'nl'];
- return view('settings.index', compact('languages'));
+ return view('settings', compact('languages'));
}
public function store(Request $request) {

RENAME
resources/views/dashboard/index.blade.php
resources/views/dashboard.blade.php
RENAME
resources/views/login/index.blade.php
resources/views/login.blade.php
RENAME
resources/views/register/index.blade.php
resources/views/register.blade.php
RENAME
resources/views/search/index.blade.php
resources/views/search.blade.php
RENAME
resources/views/settings/index.blade.php
resources/views/settings.blade.php
Fix views (singular index to single file instead of seperate directory)