Skip to content

Commit

Permalink
[11.x] Fix an issue with missing controller class (#50505)
Browse files Browse the repository at this point in the history
* Use file_exists for ControllerMakeCommand

* wip
  • Loading branch information
driesvints authored Mar 13, 2024
1 parent bf8fe84 commit d5f55e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function buildClass($name)
$replace['abort(404);'] = '//';
}

$baseControllerExists = class_exists($rootNamespace.'Http\Controllers\Controller');
$baseControllerExists = file_exists(app_path('Http/Controllers/Controller.php'));

if ($baseControllerExists) {
$replace["use {$controllerNamespace}\Controller;\n"] = '';
Expand Down

0 comments on commit d5f55e1

Please sign in to comment.