Skip to content

Commit de9f46a

Browse files
authored
Merge pull request #100 from Laravel-Backpack/fix-98
fix #98 - adding CrudTrait to Model generates error on Windows OS
2 parents 2dd97c9 + 0210e18 commit de9f46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Console/Commands/CrudModelBackpackCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function handle()
6262
! $this->option('force')) &&
6363
$this->alreadyExists($this->getNameInput())) {
6464
$file = $this->files->get($path);
65-
$file_array = explode(PHP_EOL, $file);
65+
$file_array = preg_split('/(\r\n)|\r|\n/', $file);
6666

6767
// check if it already uses CrudTrait
6868
// if it does, do nothing

0 commit comments

Comments
 (0)