diff --git a/src/DataSchema/Manager.php b/src/DataSchema/Manager.php index feacbe3..23cab60 100644 --- a/src/DataSchema/Manager.php +++ b/src/DataSchema/Manager.php @@ -70,7 +70,7 @@ public function reloadByDataSchema(DataSchema $dataSchema) public function newEntity(array $parameters = []) { - $aliasName = ucfirst($this->dataSchema->name); + $aliasName = ucfirst(str_replace("-","_", $this->dataSchema->name)); $namespace = "App\Models\DataSchema"; $fullAliasName = "\\".$namespace."\\".$aliasName;