1

Why? Why does Eloquent with SQLite only fetch attributes as strings? I spent at least half an hour debugging, I just want to set up a local test DB and now I have to run a whole PostgreSQL instance

Comments
  • 1
    Total Overkill.

    But this has nothing to do with Eloquent.

    The problem lies deeper.

    Deep in the PDO architecture.

    PDO afaik returns only strings, as this is supported in all cases.

    If you use sqlite3 driver (not PDO) it would work.
  • 2
    You can also cast things from your models
  • 0
    @Lyniven ^ this. Check the casts property in the Model class
Add Comment