Illuminate\Foundation\Console\AppNameCommand::replaceIn PHP Method

replaceIn() protected method

Replace the given string in the given file.
protected replaceIn ( string $path, string | array $search, string | array $replace ) : void
$path string
$search string | array
$replace string | array
return void
    protected function replaceIn($path, $search, $replace)
    {
        if ($this->files->exists($path)) {
            $this->files->put($path, str_replace($search, $replace, $this->files->get($path)));
        }
    }