0
First good afternoon.
I’m trying to create a route system in PHP. So far I have the following routes:
$prefix['teste'] = array('dados' => array(
'GET' => array(
'Auth/{id}' => array('Method' => 'ControllerAutenticacao@Auth', 'Logged' => 'true'),
'Outros/{id}' => array('Method' => 'ControllerAutenticacao@Auth', 'Logged' => 'true'),
'Outro/{id}' => array('Method' => 'ControllerAutenticacao@Auth', 'Logged' => 'true')),
'POST' => array(
'Auth/{id}' => array('Method' => 'ControllerAutenticacao@Auth', 'Logged' => 'true'))
));
my question: how do I make PHP understand what is inside keys /{id} is a parameter?
I don’t know if I was clear, it’s just that I prefer to understand the logic before I start using frameworks..