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?
if ($depreciation->save()) {
// 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());

View file

@ -66,7 +66,7 @@ class ManufacturersController extends Controller
$manufacturer->user_id = Auth::user()->id;
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());
@ -118,7 +118,7 @@ class ManufacturersController extends Controller
// Was it created?
if ($manufacturer->save()) {
// 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());

View file

@ -95,7 +95,7 @@ class SuppliersController extends Controller
// Was it created?
if ($supplier->save()) {
// 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()) {
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());