Since the Item class is getting information from a table then it is a Model. Put this directly under the app directory.
As for the CompleteProtein class. Does it give output back to the user? For example does it make a query, manipulate that data and send the result to a page? If so this is an Controller. Put it under app/Http/Controllers/ But try to follow an example controller, especially the top declaration parts.
Any html produced by the CompleteProtein class should be done with view calls to blade templates.
You could also make a package of both of these if you wanted to keep the current layout. But that is only for things that need to be used by other systems or frameworks. And you can't change the layout.
Or you could namespace the classes put them in a new directory under app and call them directly. But you would still need a skeleton Controller. This is a bit more messy to maintain. Not really recommended.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.