public function index($lang = 'ua') { $article = new Article(); $articles = $article->getLatestNews($lang, 4); if ($this->getTexts($lang)) { $texts = $this->getTexts($lang); $counter = new Counter(); $counter = $counter->getCounter(); $counter->date = date('m/j/Y H:m', strtotime($counter->date)); return v()->with(['articles' => $articles, 'text' => $texts, 'lang' => $lang, 'counter' => $counter]); } else { $error = 'NO SUCH LANGUAGE'; return \View::make('errors/404', ['error' => $error]); } }