Controller Problem

vram2008 | 3 years ago

I have been trying out Recess and going through some of the examples. I have started a new application and started to slight modify the controller code and ran into problem.

I am doing the default helloWorld example:

I am changing the default controller
/** !Route GET */
function index() {

$this->flash = 'Welcome to your new Recess application!';
exit;
}

to something like this:

/** !Route GET, /default */
function index() {

$this->flash = 'Welcome to your new Recess application!';
exit;
}

expecting to access helloWorld/default. But it doesnt seem to work. I get a resource does not exist message. From the example I feel that i should be able to do so. Is there any other setting that I need to change?

Thanks
Vram



thebeline | 3 years ago

/** !Route GET, default */

No leading forward slash, and forward slashes only between levels. Example:

/** !Route GET, posts */

/** !Route GET, post/$id */

/** !Route GET, post/$id/edit */

Note the lack of leading and trailing forward slashes.

reply



Welcome KrisJordan!

Web: http://www.krisjordan.com/

Location: North Carolina

Edit Profile