Skip to content

Instantly share code, notes, and snippets.

@Doopin
Last active December 28, 2017 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Doopin/2cfad36f58a0d36b2ed439e4bf8037ed to your computer and use it in GitHub Desktop.
Save Doopin/2cfad36f58a0d36b2ed439e4bf8037ed to your computer and use it in GitHub Desktop.
Module Config
<?php
[
'router' => [
'routes' => [
'api.rest' => [
'type' => 'Hostname',
'options' => [
'route' => 'api.site.dev'
],
'may_terminate' => false,
'child_routes' => [
'api.rest.home' => [
'type' => 'Literal',
'options' => [
'route' => '/',
'defaults' => [
'controller' => 'Api\\V1\\Rest\\Welcome\\Controller',
]
],
'may_terminate' => true,
'child_routes' => [
'api.rest.app' => [
'type' => 'Literal',
'options' => [
'route' => 'app',
],
'may_terminate' => false,
'child_routes' => [
'api.rest.app.posts' => [
'type' => 'Literal',
'options' => [
'route' => '/posts',
'defaults' => [
'controller' => 'Api\\V1\\Rest\\Post\\Controller',
],
],
]
]
]
],
]
]
],
]
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment