Refactor code
This commit is contained in:
parent
cb613f6a05
commit
0444297a6a
|
@ -134,7 +134,7 @@ class UserController extends Controller
|
||||||
$links->title = $title;
|
$links->title = $title;
|
||||||
$links->button_id = $buttonId;
|
$links->button_id = $buttonId;
|
||||||
$links->save();
|
$links->save();
|
||||||
$links->order = (intval($links->id) - 1);
|
$links->order = ($links->id - 1);
|
||||||
$links->save();
|
$links->save();
|
||||||
|
|
||||||
return back();
|
return back();
|
||||||
|
@ -157,7 +157,7 @@ class UserController extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newOrder = $startLinkOrder = $perPage * ($currentPage - 1);
|
$newOrder = $perPage * ($currentPage - 1);
|
||||||
$linkNewOrders = [];
|
$linkNewOrders = [];
|
||||||
foreach ($linkOrders as $linkId) {
|
foreach ($linkOrders as $linkId) {
|
||||||
if ($linkId < 0) {
|
if ($linkId < 0) {
|
||||||
|
|
Loading…
Reference in New Issue