| @@ 57-63 (lines=7) @@ | ||
| 54 | $attributes['slug'] = str_slug(array_get($attributes, 'slug'), '_'); |
|
| 55 | $attributes['prefix'] = array_get($attributes, 'prefix', array_get($attributes, 'namespace') . '_'); |
|
| 56 | ||
| 57 | if (isset($attributes['name'])) { |
|
| 58 | array_set( |
|
| 59 | $attributes, |
|
| 60 | config('app.fallback_locale') . '.name', |
|
| 61 | array_pull($attributes, 'name') |
|
| 62 | ); |
|
| 63 | } |
|
| 64 | ||
| 65 | if (isset($attributes['description'])) { |
|
| 66 | array_set( |
|
| @@ 65-71 (lines=7) @@ | ||
| 62 | ); |
|
| 63 | } |
|
| 64 | ||
| 65 | if (isset($attributes['description'])) { |
|
| 66 | array_set( |
|
| 67 | $attributes, |
|
| 68 | config('app.fallback_locale') . '.description', |
|
| 69 | array_pull($attributes, 'description') |
|
| 70 | ); |
|
| 71 | } |
|
| 72 | ||
| 73 | return $this->model->create($attributes); |
|
| 74 | } |
|