Files
streamline-emr/docker/_streamline-src/database/seeders/SuppliersTableSeeder.php
T

36 lines
815 B
PHP
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
//use Illuminate\Support\Facades\DB;
use Streamline\Models\Supplier;
class SuppliersTableSeeder extends Seeder {
/**
* Run the database seeders.
*
* @return void
*/
public function run() {
$names = array(
'JOINT MEDICAL STORES (JMs)',
'NATIONAL MEDICAL STORES (NMS)'
);
foreach ($names as $name) {
// Prevent re-seeding the same data
Supplier::firstOrCreate([
'name' => $name,
'company' => '',
'mobile_number' => '0392700806',
'address' => 'P.O.Box 109  256 Kabale, Uganda',
'created_by' => 1,
'updated_by' => 1
]);
}
}
}