Skip to content

Commit 3160ae9

Browse files
authored
Update src/Laravel/Eloquent/State/CollectionProvider.php
1 parent f0f7b04 commit 3160ae9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Laravel/Eloquent/State/CollectionProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
5858
$query = $extension->apply($query, $uriVariables, $operation, $context);
5959
}
6060

61-
$order = $operation->getOrder();
62-
if (null !== $order) {
61+
if ($order = $operation->getOrder()) {
6362
$isList = array_is_list($order);
64-
foreach ($operation->getOrder() ?? [] as $property => $direction) {
63+
foreach ($order as $property => $direction) {
6564
if ($isList) {
6665
$property = $direction;
6766
$direction = 'ASC';

0 commit comments

Comments
 (0)