Fixed forgotten to-> to ->route

This commit is contained in:
snipe 2016-12-15 18:20:41 -08:00
parent d6b41759f0
commit 01f9deb5a6
3 changed files with 5 additions and 5 deletions

View file

@ -75,7 +75,7 @@ class DepreciationsController extends Controller
// Was the asset created? // Was the asset created?
if ($depreciation->save()) { if ($depreciation->save()) {
// Redirect to the new depreciation page // Redirect to the new depreciation page
return redirect()->to("admin/settings/depreciations")->with('success', trans('admin/depreciations/message.create.success')); return redirect()->route('depreciations.index')->with('success', trans('admin/depreciations/message.create.success'));
} }
return redirect()->back()->withInput()->withErrors($depreciation->getErrors()); return redirect()->back()->withInput()->withErrors($depreciation->getErrors());

View file

@ -66,7 +66,7 @@ class ManufacturersController extends Controller
$manufacturer->user_id = Auth::user()->id; $manufacturer->user_id = Auth::user()->id;
if ($manufacturer->save()) { if ($manufacturer->save()) {
return redirect()->to("admin/settings/manufacturers")->with('success', trans('admin/manufacturers/message.create.success')); return redirect()->route('manufacturers.index')->with('success', trans('admin/manufacturers/message.create.success'));
} }
return redirect()->back()->withInput()->withErrors($manufacturer->getErrors()); return redirect()->back()->withInput()->withErrors($manufacturer->getErrors());
@ -118,7 +118,7 @@ class ManufacturersController extends Controller
// Was it created? // Was it created?
if ($manufacturer->save()) { if ($manufacturer->save()) {
// Redirect to the new manufacturer page // Redirect to the new manufacturer page
return redirect()->to("admin/settings/manufacturers")->with('success', trans('admin/manufacturers/message.update.success')); return redirect()->route('manufacturers.index')->with('success', trans('admin/manufacturers/message.update.success'));
} }
return redirect()->back()->withInput()->withErrors($manufacturer->getErrors()); return redirect()->back()->withInput()->withErrors($manufacturer->getErrors());

View file

@ -95,7 +95,7 @@ class SuppliersController extends Controller
// Was it created? // Was it created?
if ($supplier->save()) { if ($supplier->save()) {
// Redirect to the new supplier page // Redirect to the new supplier page
return redirect()->to("admin/settings/suppliers")->with('success', trans('admin/suppliers/message.create.success')); return redirect()->route('suppliers.index')->with('success', trans('admin/suppliers/message.create.success'));
} }
@ -180,7 +180,7 @@ class SuppliersController extends Controller
} }
if ($supplier->save()) { if ($supplier->save()) {
return redirect()->to("admin/settings/suppliers")->with('success', trans('admin/suppliers/message.update.success')); return redirect()->route('suppliers.index')->with('success', trans('admin/suppliers/message.update.success'));
} }
return redirect()->back()->withInput()->withErrors($supplier->getErrors()); return redirect()->back()->withInput()->withErrors($supplier->getErrors());