Sometimes, no matter how senior you are, little issues like this can humble you. I recently faced a confusing issue where I was expecting a relationship to give me a User object, but instead, it just gave me a number! After two days of scratching my head, I finally figured out what went wrong.
PHP
Run seeders from migrations
A practical look at why you should populate essential data from migrations instead of seeders. Once your app is live, manually running seeders becomes a deployment risk. Migrations are deterministic, automatic, and roll back cleanly. Read more…