diff --git a/src/Commands/MakeJobCommand.php b/src/Commands/MakeJobCommand.php index ae0b650..34ee152 100644 --- a/src/Commands/MakeJobCommand.php +++ b/src/Commands/MakeJobCommand.php @@ -38,7 +38,11 @@ protected function handle(): int } $namespace = 'App\\Jobs' . (count($parts) > 0 ? '\\' . implode('\\', $parts) : ''); - $filePath = base_path('app/Jobs/' . str_replace('/', DIRECTORY_SEPARATOR, $name) . '.php'); + $parts[] = $className; + + $filePath = base_path( + 'app/Jobs/' . implode(DIRECTORY_SEPARATOR, $parts) . '.php' + ); // Check if Job already exists if (file_exists($filePath)) {