Skip to content

Version 2.5.0

Compare
Choose a tag to compare
@silentworks silentworks released this 09 Dec 23:07

redirectTo

You can now use redirectTo when you want to redirect to a named route. redirectTo is a shortcut for redirect(urlfor(..))

$app->get('/', function () {})->name('home');
$app->get('/home', function () use ($app) {
    $app->redirectTo('home');
});

Route::via() and Route::appendHttpMethods()

Allow passing array of methods to via() and appendHttpMethods()

$app->get('/', function () {
    echo "This route only available on GET and POST requests";
})->via(array('GET', 'POST'));

Other Changes

  • Fix failed test because of hardcoded directory separator on Windows
  • Add PHP 5.6 to Travis CI tests
  • Added how to run Slim on Google App Engine/Cloud Platform to the README.markdown