I have a table where the Primary Key looks like this: 123456-789 in the id column. When I query all the records from my table using $allArray = $this->all()->toArray() , I have a problem. All data goes as expected, but the id now looks like this: 123456789 . The id column is set as varchar(24) utf8_general_ci in the database.
When I print_r() my result from $all = $this->all() (without ->toArray() ), I see that the id was currently selected 123456-789 . Then I try to get id again, like echo $all[1]->id , this is 123456789 .
Any help would be greatly appreciated. Thanks:)
source share