Skip to content

Commit 08aa657

Browse files
committed
Avoid regex multiline line ending
1 parent c2472ef commit 08aa657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generators/ModelGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private function addTraits(Model $model, $stub)
243243
}
244244

245245
$stub = str_replace('use Illuminate\\Database\\Eloquent\\Model;', 'use Illuminate\\Database\\Eloquent\\Model;' . PHP_EOL . 'use Illuminate\\Database\\Eloquent\\SoftDeletes;', $stub);
246-
$stub = preg_replace('/^\\{$/m', '{' . PHP_EOL . ' use SoftDeletes;' . PHP_EOL, $stub);
246+
$stub = Str::replaceFirst('{', '{' . PHP_EOL . ' use SoftDeletes;' . PHP_EOL, $stub);
247247

248248
return $stub;
249249
}

0 commit comments

Comments
 (0)