reworked all of the controllers to use . for views and / for redirects

This commit is contained in:
2019-04-27 20:56:01 -05:00
parent 5564b09c3b
commit d45e8f8606
7 changed files with 20 additions and 20 deletions

View File

@@ -51,6 +51,6 @@ class DashboardController extends Controller
'roles' => $roles,
];
return view('dashboard/profile')->with('data', $data);
return view('dashboard.profile')->with('data', $data);
}
}

View File

@@ -33,11 +33,11 @@ class MoonsAdminController extends Controller
$journal = DB::select('SELECT amount,reason,description,date FROM `player_donation_journal` WHERE corporation_id=98287666 AND date >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) ORDER BY date DESC');
return view('moons/admin/moonjournal')->with('journal', $journal);
return view('moons.admin.moonjournal')->with('journal', $journal);
}
public function updateMoon() {
return view('moons/admin/updatemoon');
return view('moons.admin.updatemoon');
}
public function storeUpdateMoon(Request $request) {
@@ -112,7 +112,7 @@ class MoonsAdminController extends Controller
}
public function addMoon() {
return view('moons/admin/addmoon');
return view('moons.admin.addmoon');
}
/**
@@ -222,7 +222,7 @@ class MoonsAdminController extends Controller
]);
}
return view('moons/admin/adminmoon')->with('table', $table);
return view('moons.admin.adminmoon')->with('table', $table);
}
public function UpdateMoonPaid(Request $request) {

View File

@@ -85,11 +85,11 @@ class MoonsController extends Controller
]);
}
return view('moons/user/moon')->with('table', $table);
return view('moons.user.moon')->with('table', $table);
}
public function displayTotalWorthForm() {
return view('moons/user/formTotalWorth');
return view('moons.user.formTotalWorth');
}
public function displayTotalWorth(Request $request) {

View File

@@ -22,7 +22,7 @@ class RegisterStructureController extends Controller
public function displayRegisterStructure() {
//Check to see if the user has the read corp journal esi scope before allowing to register a structure
if(Auth()->user()->hasEsiScope('esi-wallet.read_corporation_wallets.v1')) {
return view('structures/register/register');
return view('structures.register.register');
} else {
return view('dashboard')->with('error', 'You need to setup your esi scope for read corporation wallets');
}

View File

@@ -11,7 +11,7 @@ class StructureAdminController extends Controller
}
public function displayDashboard() {
return view('structures/admin/dashboard');
return view('structures.admin.dashboard');
}
public function storeTaxRatio(Request $request) {
@@ -29,7 +29,7 @@ class StructureAdminController extends Controller
$ratio->ratio = $request->ratio;
$ratio->save();
return redirect('structure/admin/dashboard');
return redirect('structure.admin.dashboard');
}
public function updateTaxRatio(Request $request) {
@@ -46,12 +46,12 @@ class StructureAdminController extends Controller
'ratio' => $request->ratio,
]);
return redirect('structure/admin/dashboard')->with('success', 'Tax Ratio updated for structure type: ' . $request->type . ' and corporation: ' . $request->corporation);
return redirect('/structure/admin/dashboard')->with('success', 'Tax Ratio updated for structure type: ' . $request->type . ' and corporation: ' . $request->corporation);
}
public function displayTaxRatios() {
$taxRatios = CorpTaxRation::all();
return view('structure/admin/taxratios')->with('structures', $structures);
return view('structure.admin.taxratios')->with('structures', $structures);
}
}

View File

@@ -35,7 +35,7 @@ class StructureController extends Controller
$this->middleware('role:Admin');
$corps = CorpStructure::pluck('corporation_name', 'corporation_id');
return view('structures/admin/choosecorporation')->with('corps', $corps);
return view('structures.admin.choosecorporation')->with('corps', $corps);
}
public function displayCorpTaxes(Request $request) {
@@ -59,7 +59,7 @@ class StructureController extends Controller
}
//Return the view with the data passed to it
return view('structures/admin/choosecorptaxes')->with('totalTaxes', $totalTaxes);
return view('structures.admin.choosecorptaxes')->with('totalTaxes', $totalTaxes);
}
public function displayTaxes() {
@@ -88,7 +88,7 @@ class StructureController extends Controller
];
}
return view('structures/user/taxes')->with('totalTaxes', $totalTaxes);
return view('structures.user.taxes')->with('totalTaxes', $totalTaxes);
}
public function displayTaxHistory(Request $request) {
@@ -118,6 +118,6 @@ class StructureController extends Controller
];
}
return view('structures/user/taxhistory')->with(compact('totalTaxes', 'months'));
return view('structures.user.taxhistory')->with(compact('totalTaxes', 'months'));
}
}

View File

@@ -46,7 +46,7 @@ class WikiController extends Controller
}
}
return view('/admin/dashboard')->with('success', 'Wiki has been purged.');
return view('admin.dashboard')->with('success', 'Wiki has been purged.');
}
public function displayRegister() {
@@ -61,7 +61,7 @@ class WikiController extends Controller
return redirect('/dashboard')->with('error', 'Already registered for the wiki!');
}
return view('wiki/user/register')->with('name', $name);
return view('wiki.user.register')->with('name', $name);
}
public function storeRegister(Request $request) {
@@ -118,7 +118,7 @@ class WikiController extends Controller
return redirect('/dashboard')->with('error', 'Login Not Found!');
}
return view('wiki/user/changepassword')->with('name', $name);
return view('wiki.user.changepassword')->with('name', $name);
}
public function changePassword(Request $request) {
@@ -152,7 +152,7 @@ class WikiController extends Controller
* Displays the page to add a user to a certain group
*/
public function displayAddUserToGroup() {
return view('wiki/displayaddug');
return view('wiki.displayaddug');
}
/**