Created
December 10, 2015 18:30
-
-
Save geggleto/1e52dfd646b5a2c9a8e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Use case | |
| I have several "components" which are standalone Slim applications. | |
| Maybe its a "UserManagement"... while I can run this module at /users on it's own... I want to install this package on another larger project. | |
| In my main app, | |
| I load "components"... | |
| $components = [ | |
| "UserManagement" => [ | |
| "routes" => "../usermanagement/routes.php", | |
| "prefix" => "/module" | |
| ] | |
| ]; | |
| foreach ($components as $component) { | |
| $app->group($component['prefix'], function () { | |
| include $component['routes']; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment