/home/techb158/immovalet.com/platform/packages/dev-tool/src/Commands/Make
Edit: /home/techb158/immovalet.com/platform/packages/dev-tool/src/Commands/Make/RequestMakeCommand.php (1888B)
argument('name'))) {
$this->error('Only alphabetic characters are allowed.');
return 1;
}
$name = $this->argument('name');
$path = platform_path(strtolower($this->argument('module')) . '/src/Http/Requests/' . ucfirst(Str::studly($name)) . 'Request.php');
$this->publishStubs($this->getStub(), $path);
$this->renameFiles($name, $path);
$this->searchAndReplaceInFiles($name, $path);
$this->line('------------------');
$this->info('Created successfully
' . $path . '!');
return 0;
}
/**
* {@inheritDoc}
*/
public function getStub(): string
{
return __DIR__ . '/../../../stubs/module/src/Http/Requests/{Name}Request.stub';
}
/**
* {@inheritDoc}
*/
public function getReplacements(string $replaceText): array
{
$module = explode('/', $this->argument('module'));
$module = strtolower(end($module));
return [
'{Module}' => ucfirst(Str::camel($module)),
];
}
}