• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Static Route / predefined variables

I am trying to setup a route that sets a fixed parameter

PHP Code:

hitting "/" results in

Controller method is not found: showme\first

But "/pages/showme/first" works as expected

I have read the route manual but have not found a way to do it, any help is greatly appreciated

Route code
PHP Code:

Controller method code
PHP Code:
public function showme($param 'first'

Default parameter value is ok,  Big Grin

Thanks for your reply! That works as expected with a small caveat


is now accessible instead of throwing an error

My controller looks something like this, ie. i don't want to have a default value

PHP Code:
public function showme($param '') {
   if($param == ''){show_404();}


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.