shlink/config/autoload/routes.global.php

27 lines
617 B
PHP
Raw Normal View History

2016-04-10 09:38:07 +02:00
<?php
return [
'routes' => [
[
'name' => 'home',
'path' => '/',
'middleware' => function ($req, $resp) {
$resp->getBody()->write('Hello world');
return $resp;
},
'allowed_methods' => ['GET'],
],
2016-04-10 12:06:28 +02:00
[
'name' => 'cli',
'path' => 'command-name',
'middleware' => function ($req, $resp) {
$resp->getBody()->write('Hello world from cli');
return $resp;
},
'allowed_methods' => ['GET'],
],
2016-04-10 09:38:07 +02:00
],
];