$workType = new Worktype(); $workType->type = $type; $workType->client_id = $client->id; $workType->save(); } $type = 'Defect'; 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(); } $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();