mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
34 lines
1.1 KiB
PHP
Executable File
34 lines
1.1 KiB
PHP
Executable File
<?php
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use Streamline\Models\Services;
|
|
|
|
class ServicesTableSeeder extends Seeder {
|
|
/**
|
|
* Run the database seeders.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run() {
|
|
$services = array(
|
|
array('name' => 'Doctor\'s Fee','cost' => '0','selling' => '10000','Supplier_Id' => '1','Insurance_Coverage' => '0','Account_Id' => '7','Item_Type' => '1'),
|
|
);
|
|
|
|
foreach ($services as $service):
|
|
|
|
Services::firstOrCreate([
|
|
"name" => $service['Item_Name'],
|
|
"cost_price" => $service['Cost_Price'],
|
|
"non_insured_price" => $service['Selling_Price'],
|
|
"insured_price" => 0,
|
|
"description" => $service['Description'],
|
|
"supplier_id" => $service['Supplier_Id'],
|
|
"insurance_coverage" => $service['Insurance_Coverage'],
|
|
"account_id" => $service['Account_Id'],
|
|
"item_type" => $service['Item_Type'],
|
|
]);
|
|
endforeach;
|
|
}
|
|
}
|