Skip to content

Commit 645d3a5

Browse files
committed
Remove namespace from created controller route action.
1 parent f9d7b0d commit 645d3a5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/config/routes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
"homepage": {
33
"path": "/",
44
"method": "GET",
5-
"action": "Cherry\\Controller\\DefaultController::index"
5+
"action": "DefaultController::index"
66
},
77
"add-new-user": {
88
"path": "/addUser",
99
"method": "POST",
10-
"action": "Cherry\\Controller\\DefaultController::addUser"
10+
"action": "DefaultController::addUser"
1111
},
1212
"remove-user": {
1313
"path": "/addUser/{userId}",
1414
"method": "DELETE",
15-
"action": "Cherry\\Controller\\DefaultController::removeUser"
15+
"action": "DefaultController::removeUser"
1616
},
1717
"hello": {
1818
"path": "/hello",
1919
"method": "GET",
20-
"action": "Cherry\\Controller\\HelloController::hello"
20+
"action": "HelloController::hello"
2121
}
2222
}

src/Console/Command/Maker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private function _makeController(ArgvInput $input, Output $output)
159159
$routes[$controllerTitle] = array(
160160
'path' => '/' . $controllerTitle,
161161
'method' => 'GET',
162-
'action' => 'Cherry\Controller\\' . $controllerName . '::hello'
162+
'action' => $controllerName . '::hello'
163163
);
164164

165165
// Save routes

0 commit comments

Comments
 (0)