Indexes speeds up search's, fk I would set up, you don't necessarily have to use.
You don't have to do anything with foreign keys to use Eloquent. Any relations defined in your application (hasOne, hasMany, etc.) don't rely on the foreign keys set up in the actual database. Indexes on foreign keys won't matter either for performance unless you're doing joins (which isn't how Eloquent retrieves the relationships anyways).
Foreign keys are really just an added layer of protection for database integrity.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us