'

There is no help for this route!

', 'title' => $route, ]; try { $content['text'] = file_get_contents($uri); } catch (ErrorException $e) { Log::error(trim($e->getMessage())); } if (strlen(trim($content['text'])) == 0) { $content['text'] = '

There is no help for this route.

'; } $converter = new CommonMarkConverter(); $content['text'] = $converter->convertToHtml($content['text']); return $content; } /** * @param $route * * @return bool */ public function hasRoute($route) { return Route::has($route); } /** * @param $route * @param array $content * * @internal param $title */ public function putInCache($route, array $content) { Cache::put('help.' . $route . '.text', $content['text'], 10080); // a week. Cache::put('help.' . $route . '.title', $content['title'], 10080); } /** * @param $route * * @return bool */ public function inCache($route) { return Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text'); } }