Skip to content

A free open source IT asset/license management system

Sure, whatever I guess.

snipe5a7ffa5664c5
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'));
}
}