File: /home/armgroup/libs/database/seeders/BannerItemSeeder.php
<?php
namespace Database\Seeders;
use App\Models\Banner;
use App\Models\BannerItem;
use Illuminate\Database\Seeder;
class BannerItemSeeder extends Seeder
{
public function run()
{
$coming_soon = Banner::where('position', 'coming-soon')->value('id');
$top_of_latest_products = Banner::where('position', 'top-of-latest-products')->value('id');
$why_us = Banner::where('position', 'why-us')->value('id');
$top_of_footer = Banner::where('position', 'top-of-footer')->value('id');
$footer1 = Banner::where('position', 'footer1')->value('id');
$footer2 = Banner::where('position', 'footer2')->value('id');
$footer3 = Banner::where('position', 'footer3')->value('id');
$social_networks = Banner::where('position', 'social-networks')->value('id');
$data = [
[
'banner_id' => $coming_soon,
'image' => 'images/soon-title.png',
'title' => 'coming soon',
'description' => null,
'url' => null,
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat1.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat2.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat3.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat4.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat5.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $coming_soon,
'image' => 'images/cat1.png',
'title' => 'اسپرسوساز',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_latest_products,
'image' => 'images/banner1.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_latest_products,
'image' => 'images/banner2.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 2,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_latest_products,
'image' => 'images/banner3.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 3,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $why_us,
'image' => 'images/baanner1.jpg',
'title' => 'کیفیت بی نظیر محصولات',
'description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز',
'url' => null,
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $why_us,
'image' => 'images/baanner2.jpg',
'title' => 'طراحی مدرن و زیبا',
'description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز',
'url' => null,
'sort_order' => 2,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $why_us,
'image' => 'images/baanner3.jpg',
'title' => 'خدمات پس از فروش',
'description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز',
'url' => null,
'sort_order' => 3,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $why_us,
'image' => 'images/baanner4.jpg',
'title' => 'صرفه جویی در مصرف انرژی',
'description' => 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز',
'url' => null,
'sort_order' => 4,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_footer,
'image' => 'images/icon1.png',
'title' => 'سوالات متداول',
'description' => 'برای مشاهده پاسخهای سریع به سوالات متداول و کسب اطلاعات بیشتر، اینجا کلیک کنید.',
'url' => '/pages/سوالات-متداول',
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_footer,
'image' => 'images/icon2.png',
'title' => 'تماس تلفنی',
'description' => 'تیم پشتیبانی ما آماده پاسخگویی به سوالات و نیازهای شما است. با ما تماس بگیرید.',
'url' => 'tel:+98911....',
'sort_order' => 2,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $top_of_footer,
'image' => 'images/icon3.png',
'title' => 'ارسال درخواست',
'description' => 'ارسال درخواست برای مشاوره تخصصی یا دریافت اطلاعات بیشتر، درخواست خود را از طریق فرم برای ما ارسال کنید',
'url' => '/pages/تماس-با-ما',
'sort_order' => 3,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer1,
'image' => null,
'title' => 'نماینده فروش',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer1,
'image' => null,
'title' => 'درباره ما',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer1,
'image' => null,
'title' => 'نقد و بررسی محصولات',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer2,
'image' => null,
'title' => 'پاسخ به پرسشهای متداول',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer2,
'image' => null,
'title' => 'رویههای بازگرداندن کالا',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer2,
'image' => null,
'title' => 'شرایط استفاده',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer3,
'image' => null,
'title' => 'رویه ارسال سفارش',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer3,
'image' => null,
'title' => 'نحوه ثبت سفارش',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $footer3,
'image' => null,
'title' => 'شیوه های پرداخت',
'description' => null,
'url' => null,
'sort_order' => null,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $social_networks,
'image' => 'images/facebook.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 1,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $social_networks,
'image' => 'images/instagram.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 2,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $social_networks,
'image' => 'images/youtube.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 3,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $social_networks,
'image' => 'images/whatsapp.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 4,
'created_at' => now(),
'updated_at' => now(),
],
[
'banner_id' => $social_networks,
'image' => 'images/linkdin.png',
'title' => null,
'description' => null,
'url' => null,
'sort_order' => 5,
'created_at' => now(),
'updated_at' => now(),
],
];
BannerItem::insert($data);
}
}