WIP
This commit is contained in:
49
database/seeders/OrderShippingMethodSeeder.php
Normal file
49
database/seeders/OrderShippingMethodSeeder.php
Normal 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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user