Skip to content

Commit

Permalink
Fixed forgotten to-> to ->route
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Dec 16, 2016
1 parent d6b4175 commit 01f9deb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/DepreciationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function store(Request $request)
// 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());
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/ManufacturersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function store(Request $request)
$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());
Expand Down Expand Up @@ -118,7 +118,7 @@ public function update(Request $request, $manufacturerId = null)
// 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());
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/SuppliersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function store()
// 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'));
}


Expand Down Expand Up @@ -180,7 +180,7 @@ public function update($supplierId = null)
}

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());
Expand Down

0 comments on commit 01f9deb

Please sign in to comment.