laravel postgresql Trying to access array offset on value of type int
# I found this issue only occured with POSTGRESQL Database
# I was using sqlite and there was no issue but the production
# server running postgresql had the issue because it treated
# database columns of int type as int and not string as sqlite does
# you can dd your data and you should see that it appears as string
# To solve it I wrapped the value I was retrieving around the php
# (string) helper to change it to string
#suppose you want to get the second value of the data 8900
# thus 9 in this case
# this fails
$name = User::first()->aniversary[1];
# try this instead
$name = ((string)User::first()->aniversary)[1];