From c4f119de9c65e9d483bf27a267a1aca53567d83b Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 18 Feb 2018 22:15:14 +0000 Subject: [PATCH] Fix routes in controllers for RP support --- app/Http/Controllers/ItemController.php | 14 +++++++------- app/Http/Controllers/SettingsController.php | 8 ++++---- app/Http/Controllers/TagController.php | 8 ++++---- config/app.php | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 46aba323..6efbd31e 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -49,7 +49,7 @@ class ItemController extends Controller $item = Item::findOrFail($id); $item->pinned = true; $item->save(); - return redirect()->route('dash'); + return redirect()->route('dash', [], false); } /** @@ -62,7 +62,7 @@ class ItemController extends Controller $item = Item::findOrFail($id); $item->pinned = false; $item->save(); - return redirect()->route('dash'); + return redirect()->route('dash', [], false); } /** @@ -81,7 +81,7 @@ class ItemController extends Controller $data['ajax'] = true; return view('sortable', $data); } else { - return redirect()->route('dash'); + return redirect()->route('dash', [], false); } } @@ -151,7 +151,7 @@ class ItemController extends Controller $item->parents()->sync($request->tags); - return redirect()->route('dash') + return redirect()->route('dash', [], false) ->with('success', __('app.alert.success.item_created')); } @@ -214,7 +214,7 @@ class ItemController extends Controller $item->parents()->sync($request->tags); - return redirect()->route('dash') + return redirect()->route('dash', [], false) ->with('success',__('app.alert.success.item_updated')); } @@ -236,7 +236,7 @@ class ItemController extends Controller Item::find($id)->delete(); } - return redirect()->route('items.index') + return redirect()->route('items.index', [], false) ->with('success',__('app.alert.success.item_deleted')); } @@ -252,7 +252,7 @@ class ItemController extends Controller Item::withTrashed() ->where('id', $id) ->restore(); - return redirect()->route('items.index') + return redirect()->route('items.index', [], false) ->with('success',__('app.alert.success.item_restored')); } diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 3da34556..c37e2483 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -39,7 +39,7 @@ class SettingsController extends Controller 'setting' => $setting, ]); } else { - return redirect()->route('settings.list')->with([ + return redirect()->route('settings.list', [], false)->with([ 'error' => __('app.alert.error.not_exist'), ]); } @@ -73,11 +73,11 @@ class SettingsController extends Controller $setting->save(); - return redirect()->route('settings.index')->with([ + return redirect()->route('settings.index', [], false)->with([ 'success' => __('app.alert.success.setting_updated'), ]); } else { - return redirect()->route('settings.index')->with([ + return redirect()->route('settings.index', [], false)->with([ 'error' => __('app.alert.error.not_exist'), ]); } @@ -94,7 +94,7 @@ class SettingsController extends Controller $setting->value = ''; $setting->save(); } - return redirect()->route('settings.index')->with([ + return redirect()->route('settings.index', [], false)->with([ 'success' => __('app.alert.success.setting_updated'), ]); diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 97160159..7749e14c 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -66,7 +66,7 @@ class TagController extends Controller //die(print_r($request->all())); Item::create($request->all()); - return redirect()->route('dash') + return redirect()->route('dash', [], false) ->with('success', __('app.alert.success.tag_created')); } @@ -129,7 +129,7 @@ class TagController extends Controller Item::find($id)->update($request->all()); - return redirect()->route('dash') + return redirect()->route('dash', [], false) ->with('success',__('app.alert.success.tag_updated')); } @@ -151,7 +151,7 @@ class TagController extends Controller Item::find($id)->delete(); } - return redirect()->route('tags.index') + return redirect()->route('tags.index', [], false) ->with('success',__('app.alert.success.item_deleted')); } @@ -167,7 +167,7 @@ class TagController extends Controller Item::withTrashed() ->where('id', $id) ->restore(); - return redirect()->route('tags.index') + return redirect()->route('tags.index', [], false) ->with('success',__('app.alert.success.item_restored')); } diff --git a/config/app.php b/config/app.php index 368f597d..a1d92c51 100644 --- a/config/app.php +++ b/config/app.php @@ -14,7 +14,7 @@ return [ */ 'name' => env('APP_NAME', 'Heimdall'), - 'version' => '1.4.2', + 'version' => '1.4.3', /* |--------------------------------------------------------------------------