File: /mnt/data/ghayatcom/ghayatcom-api/database/seeders/SubscriptionDetailSeeder.php
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\SubscriptionDetail;
class SubscriptionDetailSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$datas = [
1 => [
'plan_id' => 1,
'title' => 'Access to teleconsultations',
'content' => 'Chat / Audio / Video',
'important' => '0',
'created_by' => 1
],
2 => [
'plan_id' => 1,
'title' => 'Doctor available now',
'content' => 'Find a doctor online for immediate telemedicine consultation',
'important' => '1',
'created_by' => 1
],
3 => [
'plan_id' => 1,
'title' => 'Schedule an appointment',
'content' => 'Schedule a future appointment',
'important' => '1',
'created_by' => 1
],
4 => [
'plan_id' => 1,
'title' => 'Home visits',
'content' => 'Doctors visit you where you choose',
'status' => '0',
'important' => '0',
'created_by' => 1
],
5 => [
'plan_id' => 1,
'title' => 'Access to your health records',
'content' => 'Manage your healthcare records',
'important' => '0',
'created_by' => 1
],
6 => [
'plan_id' => 1,
'title' => 'e-prescriptions',
'content' => 'Unlimited e-prescriptions. Limited access to e-prescriptions history.',
'important' => '0',
'created_by' => 1
],
7 => [
'plan_id' => 1,
'title' => 'Family group',
'content' => 'Add family members and deoendents to your account',
'status' => '0',
'important' => '0',
'created_by' => 1
],
8 => [
'plan_id' => 1,
'title' => 'Insurance claims',
'content' => 'Access to export insurance forms to insure\'s',
'status' => '0',
'important' => '0',
'created_by' => 1
],
9 => [
'plan_id' => 1,
'title' => '',
'content' => 'A €3.50 platform fee and 2.5% transaction fee will be charged for all constructions.',
'important' => '1',
'created_by' => 1
],
10 => [
'plan_id' => 2,
'title' => 'Access to teleconsultations',
'content' => 'Chat / Audio / Video',
'status' => '1',
'important' => '0',
'created_by' => 1
],
11 => [
'plan_id' => 2,
'title' => 'Doctor available now',
'content' => 'Find a doctor online for immediate telemedicine consultation',
'status' => '1',
'important' => '1',
'created_by' => 1
],
12 => [
'plan_id' => 2,
'title' => 'Schedule an appointment',
'content' => 'Schedule a future appointment',
'status' => '1',
'important' => '1',
'created_by' => 1
],
13 => [
'plan_id' => 2,
'title' => 'Home visits',
'content' => 'Doctors visit you where you choose',
'status' => '1',
'important' => '0',
'created_by' => 1
],
14 => [
'plan_id' => 2,
'title' => 'Access to your health records',
'content' => 'Manage your healthcare records',
'status' => '1',
'important' => '0',
'created_by' => 1
],
15 => [
'plan_id' => 2,
'title' => 'e-prescriptions',
'content' => 'Unlimited e-prescriptions. Limited access to e-prescriptions history.',
'status' => '1',
'important' => '0',
'created_by' => 1
],
16 => [
'plan_id' => 2,
'title' => 'Family group',
'content' => 'Add family members and deoendents to your account',
'status' => '1',
'important' => '0',
'created_by' => 1
],
17 => [
'plan_id' => 2,
'title' => 'Insurance claims',
'content' => 'Access to export insurance forms to insure\'s',
'status' => '1',
'important' => '0',
'created_by' => 1
],
18 => [
'plan_id' => 2,
'title' => 'No platform fees',
'content' => '',
'status' => '1',
'important' => '1',
'created_by' => 1
],
19 => [
'plan_id' => 2,
'title' => '',
'content' => 'A 2.5% transaction fee will be charged for all constructions.',
'status' => '1',
'important' => '1',
'created_by' => 1
],
];
foreach ($datas as $id => $data) {
$row = SubscriptionDetail::firstOrNew([
'id' => $id,
]);
$row->fill($data);
$row->save();
}
}
}