Skip to content

Commit feda0dc

Browse files
Kautokhsing
authored andcommitted
Update World.php
Return model instead of builder
1 parent a523de8 commit feda0dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/World.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static function getByCode($code)
4949
return City::where([
5050
['country_id', $country->id],
5151
['code', $code],
52-
]);
52+
])->first();
5353

5454
throw new \Khsing\World\Exceptions\InvalidCodeException("Code is invalid");
5555
}

0 commit comments

Comments
 (0)