Viewing file: PlansTableSeeder.php (4.51 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php namespace Database\Seeders; use App\Models\Plan; use Illuminate\Database\Seeder;
class PlansTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() {
$coverage=['country'=>'us','country_code'=>'1','plain_sms'=>'1','receive_sms'=>'1','send_mms'=>'1','receive_mms'=>'1','send_voice_sms'=>'1', 'receive_voice_sms'=>'1','send_whatsapp_sms'=>'1','receive_whatsapp_sms'=>'1','added_by'=>'admin','admin_id'=>'1'];
\App\Models\Coverage::create($coverage); $plans = [ [ 'title' => 'Trial', 'plan_type' => 'normal', 'price' => '0', 'status' => 'active', 'added_by' => 'admin', 'admin_id' => 1, 'sms_sending_limit' => 0, 'max_contact' => 0, 'contact_group_limit' => 0, 'sms_unit_price' => 0, 'free_sms_credit' => 0, 'short_description' => 'Trial Plan', 'created_at' => now(), 'updated_at' => now(), 'coverage_ids' => json_encode(["1"]), 'custom_date' => '11/15/2023 - 11/15/2023', 'recurring_type' => 'yearly', 'enable_for' => 'customer', 'set_as_popular' => 'no', 'api_availability' => 'no', 'unlimited_sms_send' => 'no', 'unlimited_contact' => 'no', 'unlimited_contact_group' => 'no', 'sender_id_verification' => 'no' ], [ 'admin_id' => 1, 'title' => 'Basic', 'price' => 50, 'status' => 'active', 'created_at' => now(), 'updated_at' => now(), 'plan_type' => 'normal', 'custom_date' => '11/15/2023 - 11/15/2023', 'recurring_type' => 'yearly', 'added_by' => 'admin', 'coverage_ids' => json_encode(["1"]), 'short_description' => 'Basic customer plan', 'max_contact' => 20, 'sms_unit_price' => 0.5, 'free_sms_credit' => 20, 'sms_sending_limit' => 50, 'contact_group_limit' => 20, 'enable_for' => 'customer', 'set_as_popular' => 'no', 'api_availability' => 'no', 'unlimited_sms_send' => 'no', 'unlimited_contact' => 'no', 'unlimited_contact_group' => 'no', 'sender_id_verification' => 'no' ], [ 'admin_id' => 1, 'title' => 'Reseller Plan', 'price' => 100, 'status' => 'active', 'created_at' => now(), 'updated_at' => now(), 'plan_type' => 'reseller', 'custom_date' => '11/15/2023 - 11/15/2023', 'recurring_type' => 'yearly', 'added_by' => 'admin', 'coverage_ids' => json_encode(["1"]), 'short_description' => 'Plan tailored for resellers', 'max_contact' => 100, 'sms_unit_price' => 0.3, 'free_sms_credit' => 50, 'sms_sending_limit' => 100, 'contact_group_limit' => 100, 'enable_for' => 'reseller', 'set_as_popular' => 'yes', 'api_availability' => 'yes', 'unlimited_sms_send' => 'no', 'unlimited_contact' => 'no', 'unlimited_contact_group' => 'no', 'sender_id_verification' => 'no' ], ]; Plan::insert($plans); } }
|