From 078834799079174731238efc1fa2db2edeae4855 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Oct 2017 22:49:57 -0700 Subject: [PATCH] Cleaned up status label method --- app/Http/Controllers/StatuslabelsController.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/StatuslabelsController.php b/app/Http/Controllers/StatuslabelsController.php index 0b075d6e79..bd5c34360a 100755 --- a/app/Http/Controllers/StatuslabelsController.php +++ b/app/Http/Controllers/StatuslabelsController.php @@ -32,18 +32,17 @@ class StatuslabelsController extends Controller public function index() { - return view('statuslabels/index', compact('statuslabels')); + return view('statuslabels.index', compact('statuslabels')); } public function show($id) { - $statuslabel = Statuslabel::find($id); - if (isset($statuslabel->id)) { - return view('statuslabels/view', compact('statuslabel')); + if ($statuslabel = Statuslabel::find($id)) { + return view('statuslabels.view')->with('statuslabel', $statuslabel); } - return redirect()->route('statuslabels.index')->with('error', trans('admin/locations/message.does_not_exist', compact('id'))); + return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist', compact('id'))); }