generic approach to getting structured data?
I am building an app that deals with structured data (e.g. a company, departments, managers, employees). It will interface with e.g. a specific company directory to get the data.
My app exposes generic models and methods. E.g. $company->getManagers() or $manager->getEmployees(). I would like to make this generic, so that I can use the same approach for different installs (one install per company). So, I deploy the app multiple times and for each deploy I configure which company interface to use.
Each company can have a different (external) company directory, which is a different database type / structure. Could be a flat CSV file, through a REST API, could be a relational database (and where each company could have a different structure).
So, in the config I set which company directory to use, and then internally this will lead to the correct handling of getting e.g. the managers.
In the past I have created Laravel apps using specific + regular models. What would the Laravel approach be for something more generic?
Please or to participate in this conversation.