This commit is contained in:
Mekan1206
2026-04-29 22:26:04 +05:00
parent 9b95087b94
commit dd633ef7da
19 changed files with 314 additions and 35 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace Database\Seeders;
use App\Models\Ecommerce\Product\Order\Shipping\OrderShippingMethod;
use Illuminate\Database\Seeder;
class OrderShippingMethodSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$methods = [
[
'slug' => 'standart',
'name' => ['en' => 'Standart', 'tk' => 'Standart', 'ru' => 'Стандарт'],
'price' => 20,
'is_active' => true,
],
[
'slug' => 'express',
'name' => ['en' => 'Express', 'tk' => 'Express', 'ru' => 'Экспресс'],
'price' => 30,
'is_active' => true,
],
[
'slug' => 'self_pickup',
'name' => ['en' => 'Self Pickup', 'tk' => 'Öz-özüňi almak', 'ru' => 'Самовывоз'],
'price' => 0,
'is_active' => true,
],
[
'slug' => 'region',
'name' => ['en' => 'Region', 'tk' => 'Welaýat', 'ru' => 'Регион'],
'price' => 40,
'is_active' => true,
],
];
foreach ($methods as $method) {
OrderShippingMethod::firstOrCreate(
['slug' => $method['slug']],
$method
);
}
}
}