diff --git a/readme.md b/readme.md index 39e1112..a6b9ceb 100644 --- a/readme.md +++ b/readme.md @@ -19,6 +19,7 @@ fi ``` ## Notes +- use studly case for model name relationships as JSON keys (example: 'option_group' => 'OptionGroup'). This is important for case sensitive file systems. - empty values are skipped - the criteria/attributes for updateOrCreate are identified with a preleading underscore - nested values represent relationships and are returned using where($key, $value)->first()->id diff --git a/src/Updater.php b/src/Updater.php index dc246b7..e1ed17b 100644 --- a/src/Updater.php +++ b/src/Updater.php @@ -141,7 +141,7 @@ class Updater */ protected function getModel(string $name) { - return '\\App\\' . pathinfo($name, PATHINFO_FILENAME); + return '\\App\\' . studly_case(pathinfo($name, PATHINFO_FILENAME)); } /**