/** * Run the database seeds. * * @return void */ public function run() { $protein = Nutrient::where('name', 'Vitamin A')->first(); if ($protein == null) { $protein = new Nutrient(); $protein->id = 320; $protein->unit = 'ug'; $protein->name = 'Vitamin A'; $protein->save(); } DB::disableQueryLog(); parent::run(); }
/** * Run the database seeds. * * @return void */ public function run() { $protein = Nutrient::where('name', 'Iron')->first(); if ($protein == null) { $protein = new Nutrient(); $protein->id = 303; $protein->unit = 'mg'; $protein->name = 'Iron'; $protein->save(); } DB::disableQueryLog(); parent::run(); }
/** * Run the database seeds. * * @return void */ public function run() { $protein = Nutrient::where('name', 'Carbohydrates')->first(); if ($protein == null) { $protein = new Nutrient(); $protein->id = 205; $protein->unit = 'g'; $protein->name = 'Carbohydrates'; $protein->save(); } DB::disableQueryLog(); parent::run(); }