Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
routing [2016/01/05 04:35]
luchothoma
routing [2016/12/30 18:42] (actual)
Línea 11: Línea 11:
 Route::​add(  ​ Route::​add(  ​
 array( ​ array( ​
-'/'​ => '​mycontroller/functionHandler'​ , //this refers to your __domain.com/​__ that will be manage the petition by the application/​controllers/​mycontroller.php file and launch the functionHandeler() fun respectively. +'/'​ => '​mycontroller.functionHandler'​ , //this refers to your __domain.com/​__ that will be manage the petition by the application/​controllers/​mycontroller.php file and launch the functionHandeler() fun respectively. 
-'​mypage','​mycontroller/func/argument', //in this case the function is called with a static argument, cause never change. +'​mypage','​mycontroller.func', //in this case the function is called with a static argument, cause never change. 
-'​query/​alpha/​int'​ => 'mycontroller/getQuery/argument1/argument2'​+'​query/​:alpha/:int' => 'subfolder/othercontroller.getQuery' ​//dynamic route , multi-arguments and access to sub folder inside controller one
 )//End of array )//End of array
 ); );
Línea 34: Línea 34:
  
 The above third route would cause you to see domain.com/​query/​test/​123 equal as if you visited domain.com/​index.php/​one/​test/​123456. The above third route would cause you to see domain.com/​query/​test/​123 equal as if you visited domain.com/​index.php/​one/​test/​123456.
 +
 +----
 +[[documentation|Go back to Documentation]]