From 449bff98c0c5c43535f576f425c47fcbbdc37cf3 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Mon, 5 Dec 2022 22:58:06 +0100 Subject: [PATCH] Update UserController.php --- app/Http/Controllers/UserController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 2dd4a22..d604e30 100755 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -689,11 +689,14 @@ class UserController extends Controller } function addIcon($icon, $link){ + $userId = Auth::user()->id; $links = new Link; - $links->user_id = Auth::id(); - $links->button_id = '94'; $links->link = $link; + $links->user_id = $userId; $links->title = $icon; + $links->button_id = '94'; + $links->save(); + $links->order = ($links->id - 1); $links->save(); }