Skip to content

Commit 602bb28

Browse files
authored
Support controller suffix
1 parent 20d4635 commit 602bb28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Commands/MakeControllerCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
3232
{
3333
$name = $input->getArgument('name');
3434
$output->writeln("Make controller $name");
35+
$suffix = config('app.controller_suffix', '');
36+
37+
if ($suffix && !strpos($name, $suffix)) {
38+
$name .= $suffix;
39+
}
40+
3541
if (!($pos = strrpos($name, '/'))) {
3642
$name = ucfirst($name);
3743
$file = "app/controller/$name.php";

0 commit comments

Comments
 (0)