I resolved the issue by moving the controller class declaration to the top of the controller file. It seems the previous structure was affecting how the framework recognized the controller. After the change, everything started working as expected.