If they are two separate projects, then create your own package that both would consume. If they are within the same Laravel project, then create some Service classes that both would consume.
Apr 11, 2020
3
Level 4
Share business logic between web app and api
Hey, I am building a web app with classic Laravel routers views controllers, and also building an API that mobile apps will consume. I am wondering what would be the best approach to share business logic between these two things?
One solution might me calling my own API from views, but it doesn't seem right.
Please or to participate in this conversation.