Skip to content

Commit 91d601e

Browse files
authored
Merge pull request #12 from zonneplan/feature/add-mcp-route-support
feat: add MCP route files support in module
2 parents b30d295 + e01c81f commit 91d601e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ app
7575
├──api.php
7676
├──channels.php
7777
├──console.php
78+
├──mcp.php
7879
├──MyModuleServiceProvider.php
7980
├──tests
8081
```
@@ -138,7 +139,7 @@ protected $subscribe = [
138139
All modules will by default try to load all route files in the `Routes` folder.
139140
Any of the following files will be auto loaded:
140141

141-
`routes.php` `api.php` `web.php`
142+
`routes.php` `api.php` `web.php` `mcp.php`
142143

143144
## Requirements
144145

src/Module.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ abstract class Module extends ServiceProvider implements ModuleContract
2424
'routes',
2525
'web',
2626
'api',
27+
'mcp',
2728
];
2829

2930
protected array $policies = [];

src/Support/ModuleRouteLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ModuleRouteLoader
1010
private const FALLBACK_ROUTE_TYPE = 'routes';
1111

1212
private const ROUTE_TYPES = [
13-
self::FALLBACK_ROUTE_TYPE, 'api', 'channels', 'console', 'web',
13+
self::FALLBACK_ROUTE_TYPE, 'api', 'channels', 'console', 'web', 'mcp',
1414
];
1515

1616
/**

0 commit comments

Comments
 (0)