Year data type

Hi folks,

I'm trying to retrieve data from a table where I set one of the columns to have the mysql data type to be Year(). I know Eloquent can handle this because the migration can use ->year() quite happily and it translates well into the table itself. The data then is just various years.

However filament seems to think the data held in there is a Unix timestamp and I can't figure out how to retrieve the data as is and not have it be transformed into a full date some time in the early hours of 1st Jan 1970. It seems like it should be a really straightforward thing to do and yet I can't find anything online about this.

On the table in the Resource I tried to force numeric() but that returns a formatted date. Obviously date() also treats it as a time stamp and I can't think of what else to try to simply retrieve the data as it's being stored in the database.
Was this page helpful?