$workType->save(); } $type = 'Feature'; if (is_null($project = WorkType::checkIfExists($type))) { // get $client->id $client = Client::where('name', '=', 'Kendra Scott')->first(); $workType = new Worktype(); $workType->type = $type; $workType->client_id = $client->id; $workType->save(); } /******************************************************************************************************************* * time_card_format insert(s) ******************************************************************************************************************/ $description = 'Day of week starts on SAT and ends on SUN'; if (is_null($timeCardFormat = TimeCardFormat::checkIfExists($description))) { // get $client->id $client = Client::where('name', '=', 'Kendra Scott')->first(); $timeCardFormat = new Timecardformat(); $timeCardFormat->description = $description; $timeCardFormat->dow_00 = "SUN"; $timeCardFormat->dow_01 = "MON"; $timeCardFormat->dow_02 = "TUE"; $timeCardFormat->dow_03 = "WED"; $timeCardFormat->dow_04 = "THU"; $timeCardFormat->dow_05 = "FRI"; $timeCardFormat->dow_06 = "SAT"; $timeCardFormat->client_id = $client->id; $timeCardFormat->save(); } /*******************************************************************************************************************