i'm currently working with Laravel and I'm struggling with the fact that every model needs to extend from Eloquent and I'm not sure how to implement a model Hierarchy (with different tables)
For Example:
Let's say I have an abstract model Tool, and then a Model Hammer and a Model Screwdriver that extend from Tool.
Now, Tool would extend Eloquent ... BUT, there is NO Table for Tools, there is a table for Hammers and another Table for Screwdrivers, because they have different attributes.
How do I specify that Hammer has a table and Screwdriver has a table when they both extend Tool? And how can I use Eloquent to call, For Example, All Tools?
Like:
Tools::all()
This Should bring all Hammers and Screwdrivers because they are all Tools
Is this possible using Eloquent?