
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 0.49 KB | hits: 8 | expires: Never
Multiple routes with the same anonymous callback using Slim Framework
$app->get('/first_route',function()
{
//Do stuff
});
$app->get('/second_route',function()
{
//Do same stuff
});
$app->get(['/first_route','/second_route'],function()
{
//Do same stuff for both routes
});
$app->get('/first_route',function() use($app)
{
$app->get('/second_route');//Without redirect
});
$app->get('/first_route', $ref = function()
{
//Do stuff
});
$app->get('/second_route', $ref);