laravolt/indonesia

change in 'code' vs 'id' (?)

Closed this issue · 0 comments

I just updated to Laravel 9, and when using this code
public function getCities($province){ $c = \Indonesia::findProvince($province, ['cities']); return response()->json($c); }

I got an error
exception: "Illuminate\\Database\\QueryException" file: "D:\\Work\\Laragon\\www\\ampg\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php" line: 712 message: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'indonesia_cities.province_code' in 'where clause' (SQL: select * from 'indonesia_cities' where 'indonesia_cities'.'province_code' in (?))" trace: [,…]