function listByCurrencyCompare($currencyName1, $currencyName2) { $data['dataKurs'] = KursModel::where('created_at', date('Y-m-d'))->whereNotIn('kurs.currency_code', $this->currency_code_hide)->join('currency', 'kurs.currency_code', '=', 'currency.currency_code')->join('bank', 'kurs.bank_code', '=', 'bank.bank_code')->get(); foreach ($data['dataKurs'] as $key => $value) { if ($value['currency_alias'] == str_slug('dollar')) { $rate = $value['rate_sell']; $this->theme->setTitle('Kurs ' . ucfirst($currencyName1) . ' ' . ucfirst($currencyName2) . ' Hari Ini - Rp.' . number_format($rate, 2)); } else { $rate = $value['rate_sell']; $this->theme->setTitle('Kurs ' . ucfirst($currencyName1) . ' ' . ucfirst($currencyName2) . ' Hari Ini - Rp.' . number_format($rate, 2)); } } $this->theme->setKeyword('kurs dollar rupiah, kurs rupiah, kurs hari ini, kurs rupiah hari ini, kurs dollar, kurs dollar hari ini'); $this->theme->setDescription('Informasi kurs ' . ucfirst($currencyName1) . ' ' . ucfirst($currencyName2) . ' hari ini. dibuka pada Rp.' . number_format($rate, 2)); $data['updatedDate'] = $data['dataKurs'][0]['created_at']; return $this->theme->scope('home', $data)->render(); }