Skip to content

A free open source IT asset/license management system

Added controller for state-saver for sidenav

snipe0d34cc704a15
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php
index 4554b0fea3..431542c4ef 100755
--- a/app/Http/Controllers/ProfileController.php
+++ b/app/Http/Controllers/ProfileController.php
@@ -143,5 +143,24 @@ class ProfileController extends Controller
}
+ /**
+ * Returns a page with the API token generation interface.
+ *
+ * We created a controller method for this because closures aren't allowed
+ * in the routes file if you want to be able to cache the routes.
+ *
+ * @author [A. Gianotto] [<[email protected]>]
+ * @since [v4.0]
+ * @return View
+ */
+
+ public function getMenuState(Request $request) {
+ if ($request->input('state')=='open') {
+ $request->session()->put('menu_state', 'open');
+ } else {
+ $request->session()->put('menu_state', 'closed');
+ }
+ }
+
}