shlink/config/autoload/routes.global.php
2016-07-04 08:33:31 +02:00

24 lines
579 B
PHP

<?php
use Acelaya\UrlShortener\Middleware\Routable;
use Acelaya\UrlShortener\Middleware\Rest;
return [
'routes' => [
[
'name' => 'long-url-redirect',
'path' => '/{shortCode}',
'middleware' => Routable\RedirectMiddleware::class,
'allowed_methods' => ['GET'],
],
// Rest
[
'name' => 'rest-create-shortcode',
'path' => '/rest/short-code',
'middleware' => Rest\CreateShortcodeMiddleware::class,
'allowed_methods' => ['POST'],
],
],
];