Astrotomic / laravel-translatable

A Laravel package for multilingual models
https://docs.astrotomic.info/laravel-translatable/
MIT License
1.23k stars 156 forks source link

have bug in create in seeds #226

Closed vahidalvandi closed 3 years ago

vahidalvandi commented 3 years ago

Describe the bug hi , i have bellow code work fine but in seed retrun error

        \site\entities\category::create([
            'path' => 'site',
            'is_sys' => 1,
           'fa' => [
                'title' => 'وب سایت',
           ],
           'en' => [
              'title' => 'website',
           ]
       ]);

Versions (please complete the following information)

Additional context Add any other context about the problem here.

**Exception ErrorException

Array to string conversion**

Stack Trace

**vendor/laravel/framework/src/Illuminate/Support/Str.php:524 520▕ 521▕ $result = array_shift($segments); 522▕ 523▕ foreach ($segments as $segment) { ➜ 524▕ $result .= (array_shift($replace) ?? $search).$segment; 525▕ } 526▕ 527▕ return $result; 528▕ }

  +22 vendor frames 

23 database/seeders/DatabaseSeeder.php:16 Illuminate\Database\Seeder::call()

  +22 vendor frames 

46 artisan:37**

Gummibeer commented 3 years ago

Hey,

Please add a full stack trace as the important lines are missing.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days