• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'if' method for routes service

#1
I'm thinking of adding an 'if' method to the RoutesCollection class.

It would work like this:

$routes->if(true,function($routes){
     // blah...
});

....

Or restrict routes to logged in users(Myth:Auth)

$routes->if(logged_in(),function($routes){

});

A good idea?
Reply

#2
Information 
You can use filters for this
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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