Upgrading Sage 9 project to Beta 3 with SoberWP Controller

I’ve got a project that is based on Sage beta 2, before the change to the app/ and resources/ directories. I’m also using the SoberWP Controller plugin.

I was using soberwp/controller : 9.0.0-beta2.1, so when I updated my existing project to the new structure, I switched over to dev-master of the plugin.

I have several custom templates defined, which previously, were picking up correctly.
templates/template-homepage.blade.php was correctly pulling fromsrc/controllers/template-homepage.php

Now, resources/views/template-homepage.blade.php is not pulling from resources/controllers/template-homepage.php

More interesting, when I put @debug(‘hierarchy’) in app.blade.php, I now see this:

If I try moving the controller to that location, it still doesn’t find it. If I rename the controller to /resources/controllers/front-page.php, it picks it up right away, but this doesn’t help me with my other custom templates.

Am I missing something obvious here? I have to wonder if I missed something in the upgrade and I’m hoping people can point me in the right direction.

Resolved in the latest 9.0.0-beta3 release of Controller.

1 Like

Fix works perfectly, thanks!

This doesn’t really matter because you included the filter to change the location of the controllers directory, but just out of curiosity, is there any particular reason you chose to put the default controllers directory in resources instead of app?

Perhaps a good suggestion. I’ll look into it to see what would be best practice.