I'm updating a Craft 2 plugin to Craft 3 and I'm having difficulties getting the Regex URLs working correctly. The eocs I'm using: Craft3 Docs
I used pluginfactory.io
to create the basic craft3 plugin scaffold.
For context: the plugin name is expedweather
.
This is the Route I'm trying to register:
$map_page = 'data/<range:\w+>/<peak:\w+>/<view:\w+>/<parameter:\w+>';
$event->rules[$map_page] = 'expedweather/forecastPanel';
In my DefaultController.php I've got this:
protected $allowAnonymous = ['index', 'forecast-panel'];
And I'm not sure what I'm doing wrong here but All I get is
HTTP 404 – Not Found – yii\web\NotFoundHttpException Page not found. ↵ Caused by: Invalid Route – yii\base\InvalidRouteException
I've made sure the plugin is enabled in the backstage.