I'm trying to create routes like this:
/accounts
/accounts/create
/accounts/6
/accounts/6/edit
/accounts/6/transactions
/accounts/6/transactions/creat
.
.
.
I'm writing the following to a file /app/config/routes.php and including it in my /public/index.php file but I doesn't seem to be right. Is there anything I'm doing wrong?
<?php
// Creating a router
$router = new \Phalcon\Mvc\Router();
$router->addGet("/", "Accounts::index");
$router->addGet("/accounts", "Accounts::index");
$router->add("/accounts/create", "Accounts::create");
$router->add("/accounts/{id}/edit", "Accounts::edit");
$router->add("/accounts/{id}/delete", "Accounts::delete");
$router->addGet("/accounts/{account_id}/transactions", "Transactions::index");
$router->add("/accounts/{account_id}/transactions/create", "Transactions::create");
$router->add("/accounts/{account_id}/transactions/{id}/edit", "Transactions::edit");
$router->add("/accounts/{account_id}/transactions/{id}/delete", "Transactions::delete");