Sage 11 Build - Route returning error

I’m using Sage 11 with Acorn v5 and followed the official Acorn routing documentation.

The problem:

When I run:

wp acorn route:list

I get:

Your application doesn't have any routes.

What I’ve tried so far:

  • Verified that my routes are defined in routes/web.php:
<?php

use Illuminate\Support\Facades\Route;

Route::get('/test', function () {
    return 'Route works!';
});

I forgot to update the routing docs with the new changes required to Acorn’s configuration :sweat_smile: Just pushed an update, but you’ll need to make the following change in functions.php:

 Application::configure()
     ->withProviders([
         App\Providers\ThemeServiceProvider::class,
     ])
+    ->withRouting(web: base_path('routes/web.php'))
     ->boot();
1 Like