mirror of
https://github.com/nullthoughts/laravel-data-sync.git
synced 2026-01-26 03:34:02 +00:00
WIP issue #4
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user