mirror of
https://github.com/nullthoughts/laravel-data-sync.git
synced 2026-02-20 02:55:06 +00:00
WIP issue #4
This commit is contained in:
@@ -19,6 +19,7 @@ fi
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
## 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
|
- empty values are skipped
|
||||||
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
|
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
|
||||||
- nested values represent relationships and are returned using where($key, $value)->first()->id
|
- nested values represent relationships and are returned using where($key, $value)->first()->id
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class Updater
|
|||||||
*/
|
*/
|
||||||
protected function getModel(string $name)
|
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