Skip to content

Commit

Permalink
Adapt removeSpecialChars
Browse files Browse the repository at this point in the history
Change from `private` to `protected` and overwrite it in the `MigrationGenerator` in order to comply with the laravel migration filename schema
  • Loading branch information
shalawani authored and johannesschobel committed Jan 14, 2018
1 parent b83ede6 commit 7fbef8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Generator/Commands/MigrationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,16 @@ public function getDefaultFileName()
{
return 'create_' . Str::lower($this->containerName) . '_tables';
}

/**
* Removes "special characters" from a string
*
* @param $str
*
* @return string
*/
protected function removeSpecialChars($str)
{
return $str;
}
}
2 changes: 1 addition & 1 deletion Generator/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ protected function getDefaultFileExtension()
*
* @return string
*/
private function removeSpecialChars($str)
protected function removeSpecialChars($str)
{
// remove everything that is NOT a character or digit
$str = preg_replace('/[^A-Za-z0-9]/', '', $str);
Expand Down

0 comments on commit 7fbef8d

Please sign in to comment.