HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
File: /home/armgroup/libs/database/seeders/ProductSeeder.php
<?php

namespace Database\Seeders;

use App\Models\Product;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class ProductSeeder extends Seeder
{
    public function run()
    {
        $now = now();

        $products = [
            [
                'user_id' => 1,
                'brand_id' => 1,
                'name' => 'آب پاش بالا ظرفشویی ال جی',
                'latin_name' => 'آب پاش بالا ظرفشویی ال جی',
                'slug' => 'آب-پاش-بالا-ظرفشویی-ال-جی',
                'image' => 'images/pro.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 5_600_000,
                'special' => 5_000_000,
                'special_started_at' => now(),
                'special_ended_at' => now()->addMonth(),
                'stock' => 9,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => true,
                'slider_text' => "دارای پمپ Uika ایتالیا\nدارای پمپ Uika ایتالیا\nقابلیت تهیه اسپرسو، کتپوچینو، لاته؛ موکا\nدارای سینی آبچکان جداشونده و قابل شستشو",
                'slider_video' => '',
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 2,
                'name' => 'فیلتر ظرفشویی ال جی',
                'latin_name' => 'فیلتر ظرفشویی ال جی',
                'slug' => 'فیلتر-ظرفشویی-ال-جی',
                'image' => 'images/pro5.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 200_000,
                'special' => 170_000,
                'special_started_at' => now(),
                'special_ended_at' => now()->addMonths(2),
                'stock' => 20,
                'status' => 1,
                'suggest' => 0,
                'show_in_slider' => true,
                'slider_text' => "دارای پمپ Uika فرانسه\nدارای پمپ Uika فرانسه\nقابلیت تهیه اسپرسو، کتپوچینو، لاته؛ موکا\nدارای سینی آبچکان جداشونده و قابل شستشو",
                'slider_video' => '',
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 3,
                'name' => 'فیلتر آب',
                'latin_name' => 'فیلتر آب',
                'slug' => 'فیلتر-آب',
                'image' => 'images/pro3.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 300_000,
                'special' => 250_000,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 20,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 3,
                'name' => 'پمپ آب',
                'latin_name' => 'پمپ آب',
                'slug' => 'پمپ-آب',
                'image' => 'images/pro4.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 800_000,
                'special' => 750_000,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 12,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 4,
                'name' => 'محصول تستی 5',
                'latin_name' => 'test product 5',
                'slug' => 'test5',
                'image' => 'images/pro1.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 3000_000,
                'price' => 0,
                'special' => null,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 12,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 7,
                'name' => 'محصول تستی 6',
                'latin_name' => 'test product 6',
                'slug' => 'test6',
                'image' => 'images/pro2.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 5_000_000,
                'special' => null,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 10,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 11,
                'name' => 'محصول تستی 7',
                'latin_name' => 'test product 7',
                'slug' => 'test7',
                'image' => 'images/pro2.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 500_000,
                'special' => null,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 0,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'user_id' => 1,
                'brand_id' => 9,
                'name' => 'محصول تستی 8',
                'latin_name' => 'test product 8',
                'slug' => 'test8',
                'image' => 'images/pro2.png',
                'short_description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است',
                'weight' => 300,
                'price' => 500_000,
                'special' => null,
                'special_started_at' => null,
                'special_ended_at' => null,
                'stock' => 23,
                'status' => 1,
                'suggest' => 1,
                'show_in_slider' => false,
                'slider_text' => null,
                'slider_video' => null,
                'created_at' => $now,
                'updated_at' => $now,
            ],
        ];

        Product::query()->insert($products);

        DB::table('categorizables')->insert([
            [
                'category_id' => 4,
                'categorizable_id' => 1,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 5,
                'categorizable_id' => 2,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 6,
                'categorizable_id' => 3,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 12,
                'categorizable_id' => 4,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 6,
                'categorizable_id' => 5,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 4,
                'categorizable_id' => 6,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 4,
                'categorizable_id' => 7,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
            [
                'category_id' => 5,
                'categorizable_id' => 8,
                'categorizable_type' => Product::class,
                'is_main' => true,
            ],
        ]);
    }
}