From 9d2ba44081d9750ff94e6de0efdde83e6642e537 Mon Sep 17 00:00:00 2001 From: Ostap Brehin Date: Wed, 26 Jun 2024 01:40:22 +0100 Subject: [PATCH] Fix the edge case of `.php` extension chopping in make commands --- src/Illuminate/Console/GeneratorCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Console/GeneratorCommand.php b/src/Illuminate/Console/GeneratorCommand.php index 798a9dc5e137..a70426b51203 100644 --- a/src/Illuminate/Console/GeneratorCommand.php +++ b/src/Illuminate/Console/GeneratorCommand.php @@ -417,7 +417,7 @@ protected function sortImports($stub) */ protected function getNameInput() { - return (string) Str::of($this->argument('name'))->trim()->beforeLast('.php'); + return (string) Str::of($this->argument('name'))->trim()->rtrim('.php'); } /**