public function connectdb($content, $format) { $scanFormat = $format; $scanContent = $content; $user = '******'; $type = 'inventory'; if ($scanFormat && $scanContent != null) { Scan::create(array('userEmail' => $user, 'sku' => $content, 'type' => $type)); } }