I’m in the process of upgrading a site to Acorn 5. I’ve read all the docs on how to properly boot Acorn and register routes, and I’m confused by what’s going on in the withRouting() method.
Here’s the example given under Advanced Booting in Installing Acorn in WordPress | Acorn Docs | Roots
Application::configure()
->withProviders([
//...
])
->withRouting(
web: base_path('routes/web.php'), // Laravel-style web routes
api: base_path('routes/api.php'), // API routes
wordpress: true // Enable WordPress request handling
)
->boot();
I understand the web parameter. I’m a little unclear about api (those are Laravel API routes, entirely separate from the WP REST API, right? — no authentication by default, but I can use Laravel’s API stuff if I want?)
But I have no idea what wordpress does. The mentions of it I found in the docs and here on discourse only note that it’s necessary for Livewire to work.
Tracing the source just leads me to a method Application->handleWordPressRequests(). What does this ultimately DO? Does it have side-effects? Does it change anything with query or template resolution?