Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../../database/././seeders
الملفات الموجودة في هذا الـ Path:
.
..
CustomerPlanTableSeeder.php
CustomerTableSeeder.php
DatabaseSeeder.php
PlansTableSeeder.php
UserTableSeeder.php

مشاهدة ملف: CustomerPlanTableSeeder.php

<?php

namespace Database\Seeders;

use App\Models\Plan;
use Illuminate\Database\Seeder;

class CustomerPlanTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $plan=Plan::first();
        $customerPlan = [
            'customer_id'           => 1 ,
            'plan_id'               => $plan->id,
            'email_limit'           => $plan->email_limit,
            'available_emails'      => $plan->email_limit,
            'price'                 => $plan->price,
            'contact_limit'         => $plan->contact_limit,
            'created_at'            => now(),
            'updated_at'            => now(),
        ];

        \App\Models\CustomerPlan::insert($customerPlan);
    }
}