Skip to content

Commit 24bb6b6

Browse files
committed
WIP issue #4
1 parent 9681911 commit 24bb6b6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ fi
1919
```
2020

2121
## Notes
22+
- use studly case for model name relationships as JSON keys (example: 'option_group' => 'OptionGroup'). This is important for case sensitive file systems.
2223
- empty values are skipped
2324
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
2425
- nested values represent relationships and are returned using where($key, $value)->first()->id

src/Updater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function getValues(object $record)
141141
*/
142142
protected function getModel(string $name)
143143
{
144-
return '\\App\\' . pathinfo($name, PATHINFO_FILENAME);
144+
return '\\App\\' . studly_case(pathinfo($name, PATHINFO_FILENAME));
145145
}
146146

147147
/**

0 commit comments

Comments
 (0)