mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Created entities
This commit is contained in:
15
config/autoload/cli-routes.global.php
Normal file
15
config/autoload/cli-routes.global.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return [
|
||||
|
||||
'routes' => [
|
||||
[
|
||||
'name' => 'cli',
|
||||
'path' => '/command-name',
|
||||
'middleware' => function ($req, $resp) {
|
||||
|
||||
},
|
||||
'allowed_methods' => ['CLI'],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -7,20 +7,10 @@ return [
|
||||
'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'],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user