1

This is really a question on higher level naming.

We have an API directory for classes that deal directly without outside APIs, and contain all the code to consume a specific API. We call this lib

We also have a directory "controllers" which handles requests to our system.

What we've run into now is where to put intermediate abstraction between the two. Some APIs we're using are just one way to achieve a higher level concept. I'd like to build another class to deal with some API classes, as I think it's too much logic to go directly into a controller.

Are there any standard practices for this? For reference it's a Laravel project on PHP.

Edit: currently the structure we're leaning toward is putting these into subdirectories within lib for each high level concept

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.