where('option_name', 'itil')->first(); if ($settings && $settings->status == 1) { $check = true; } } return $check; } function isBill() { $check = false; if (\Schema::hasTable('common_settings')) { $settings = \DB::table('common_settings')->where('option_name', 'bill')->first(); if ($settings && $settings->status == 1) { $check = true; } } return $check; } function deletePopUp($id, $url, $title = 'Delete', $class = 'btn btn-sm btn-danger', $btn_name = 'Delete', $button_check = true) { $button = ''; if ($button_check == true) { $button = ''.$btn_name.''; } return $button.''; } function isInstall() { $check = false; $env = base_path('.env'); if (\File::exists($env) && env('DB_INSTALL') == 1) { $check = true; } return $check; } function faveotime($date, $hour = 0, $min = 0, $sec = 0) { if (is_bool($hour) && $hour == true) { $hour = $date->hour; } if (is_bool($min) && $min == true) { $min = $date->minute; } if (is_bool($sec) && $sec == true) { $sec = $date->second; } $date1 = \Carbon\Carbon::create($date->year, $date->month, $date->day, $hour, $min, $sec); return $date1->hour($hour)->minute($min)->second($sec); }