@bobbybouwmann I followed your advise and loaded the routes from the master provider.
public function boot()
{
$this->loadRoutesFrom(__DIR__.'/../First/Routes/web.php');
$this->loadRoutesFrom(__DIR__.'/../Second/Routes/web.php');
}
I didn't change the path at all, and I commented out these lines from the respective provider. This way works, so the path is correct. But the moment I return them to being loaded by the child providers, the problem persists and only the ones from First are registered.
For clarity, this is my folder structure:
src/
First/
Controllers/
Routes/
web.php
Second/
Controllers/
Routes/
web.php
Providers/
FirstServiceProvider.php
SecondServiceProvider.php
MasterServiceProvider.php
What I gather from moving the route loading to the master provider is that this is not a problem of using separate loadRoutesFrom() methods, because I did it right there, and it worked just fine. And like I mentioned earlier, every other Service Provider loads Traits, Models, Facades, etc. of their own without a problem.
P.S. I just moved the order in which the child providers are registered:
public function register()
{
// Register all the Package's Service Providers
$this->app->register(
SecondServiceProvider::class,
FirstServiceProvider::class,
...
);
}
And this loads the routes from Second but not from First. So I guess this means that you can only load routes from 1 single service provider; which in my case should be Master. That's a bummer