From 5a7ffa5664c59029adefcbec84b115fd573800da Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 19 Feb 2025 04:18:40 +0000 Subject: [PATCH] Sure, whatever I guess. Signed-off-by: snipe --- app/Http/Controllers/Consumables/ConsumablesController.php | 6 ++++-- app/Http/Controllers/GroupsController.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Consumables/ConsumablesController.php b/app/Http/Controllers/Consumables/ConsumablesController.php index 2e232b8ddf..c96c2db975 100644 --- a/app/Http/Controllers/Consumables/ConsumablesController.php +++ b/app/Http/Controllers/Consumables/ConsumablesController.php @@ -107,7 +107,9 @@ class ConsumablesController extends Controller public function edit(Consumable $consumable) : View | RedirectResponse { $this->authorize($consumable); - return view('consumables/edit')->with('category_type', 'consumable'); + return view('consumables/edit') + ->with('item', $consumable) + ->with('category_type', 'consumable'); } @@ -199,7 +201,7 @@ class ConsumablesController extends Controller { $consumable = Consumable::withCount('users as users_consumables')->find($consumable->id); $this->authorize($consumable); - return view('consumables/view'); + return view('consumables/view', compact('consumable')); } public function clone(Consumable $consumable) : View diff --git a/app/Http/Controllers/GroupsController.php b/app/Http/Controllers/GroupsController.php index 004dd2a61b..5240043357 100755 --- a/app/Http/Controllers/GroupsController.php +++ b/app/Http/Controllers/GroupsController.php @@ -143,6 +143,6 @@ class GroupsController extends Controller */ public function show(Group $group) : View | RedirectResponse { - return view('groups/view'); + return view('groups/view', compact('group')); } }