Skip to content

Commit 0444297

Browse files
author
Milan C
committed
Refactor code
1 parent cb613f6 commit 0444297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function addLink(request $request)
134134
$links->title = $title;
135135
$links->button_id = $buttonId;
136136
$links->save();
137-
$links->order = (intval($links->id) - 1);
137+
$links->order = ($links->id - 1);
138138
$links->save();
139139

140140
return back();
@@ -157,7 +157,7 @@ public function sortLinks(Request $request)
157157
]);
158158
}
159159

160-
$newOrder = $startLinkOrder = $perPage * ($currentPage - 1);
160+
$newOrder = $perPage * ($currentPage - 1);
161161
$linkNewOrders = [];
162162
foreach ($linkOrders as $linkId) {
163163
if ($linkId < 0) {

0 commit comments

Comments
 (0)