Let's suppose I have three different types of file uploads - each with their unique attributes, each used very exclusively of the others (for example, let's say type 1 is user-uploaded files for a media library of some kind, type 2 is application-generated files for a specific module, and type 3 is is files automatically downloaded from an FTP server by a cron). These files all share some common database fields - id, disk, and path come to mind. But many other attributes might be unique to each type - like user_id or ftp_server.
If I were writing these as PHP classes, I might write a base File class, that MediaFile, CronFile, and FtpFile would extend. However, I don't believe there's any way to accomplish a similar structure using databases and Eloquent models, unless I'm mistaken and one of Laravel's many, many arcane features includes such a setup?
One strategy you could consider would be an uploads table with a couple polymorphic fields like so:
uploads
- id
- attachable_id
- attachable_type
This way you could have separate tables/models for any type of upload you need. Another approach might be to use the json mysql field type to store that type of extra information as a json string.