I managed to successfully create Laravel packages that expose API endpoints. These packages have their own databases, their own migrations, their own seeders, and their own models, controllers and routes.
They can be installed by teammates and they won't clutter the main app's directories.
Now I want to create a base layout for admin panels. Here are my constraints:
This base layout should be in React (our UI stack is decided to be React)
It has to remain inside the package folder, inside
vendorfolder. Reasons:- Because if we publish its content to main app, then
git addadds them to the main app. - Because we want developers to only focus on their tasks, and not see the base layout at all.
- Because we want developers to not change the base layout, both intentionally or accidentally.
- Base layout (React admin panel) is developed and maintained by another team, in another
gitrepository.
- Because if we publish its content to main app, then
I managed to create a package that contains HTML, CSS and JavaScript. And I could use them in the main app, but only through publishing them to the main app.
But I'm unable to make the main app access the index.html from inside the package for example. And I can't make that index.html load CSS and JS from inside the package.
How can I tell Laravel to read and load web technologies, form inside the package?