Skip to content

Commit 449bff9

Browse files
committed
Update UserController.php
1 parent ace499c commit 449bff9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/Http/Controllers/UserController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,11 +689,14 @@ function searchIcon($icon)
689689
}
690690

691691
function addIcon($icon, $link){
692+
$userId = Auth::user()->id;
692693
$links = new Link;
693-
$links->user_id = Auth::id();
694-
$links->button_id = '94';
695694
$links->link = $link;
695+
$links->user_id = $userId;
696696
$links->title = $icon;
697+
$links->button_id = '94';
698+
$links->save();
699+
$links->order = ($links->id - 1);
697700
$links->save();
698701
}
699702

0 commit comments

Comments
 (0)