shlink/config/autoload/routes.global.php
2016-04-16 12:57:11 +02:00

26 lines
618 B
PHP

<?php
return [
'routes' => [
[
'name' => 'home',
'path' => '/',
'middleware' => function ($req, $resp) {
$resp->getBody()->write('Hello world');
return $resp;
},
'allowed_methods' => ['GET'],
],
[
'name' => 'cli',
'path' => '/command-name',
'middleware' => function ($req, $resp) {
$resp->getBody()->write('Hello world from cli');
return $resp;
},
'allowed_methods' => ['CLI'],
],
],
];