I'm following the documentation with the code, but http://localhost/silverstripe/teams or http://localhost/silverstripe/player does not work?
TeamController.php
<?php
class TeamController extends Controller {
private static $allowed_actions = array(
'players',
'index'
);
public function index(SS_HTTPRequest $request) {
// ..
}
public function players(SS_HTTPRequest $request) {
print_r($request->allParams());
}
}
config.yml
---
Name: mysite
After:
- 'framework/*'
- 'cms/*'
---
# YAML configuration for SilverStripe
# See http://doc.silverstripe.org/framework/en/topics/configuration
# Caution: Indentation through two spaces, not tabs
SSViewer:
theme: 'simple'
Director:
rules:
'teams//$Action/$ID/$Name': 'TeamController'
'player/': 'PlayerController'
'': 'HomeController'