The problem is the following:
1) I have millions of rows in a few tables in the database, so using Eloquent is not efficient, as I have also multiple relationships. The solution in this case was to write custom DB::raw() selects and joins to accomplish the tasks efficiently. This returns a StdClass as you may know.
2) I have 4-5 models that have quite lengthy methods, which I need to use, so a best possible solution would be to create instances of those models for each row of the StdClass, and then use those methods.
Is there a known 'best practice' for 'porting' the info from the StdClass into the models, in terms of OOP patterns? How would you guys tackle this problem? I would take any suggestions, I am ready to even restructure the code.
P.S. Laravel v4.2