/** * @param Content $content * * @return \Illuminate\View\View */ public function chooseThumbnail($content) { if (!$content->canEdit(Auth::user())) { return Redirect::route('content_comments', $content->getKey())->with('danger_msg', 'Minął czas dozwolony na edycję treści.'); } $thumbnails = []; try { $summon = new Summon($content->getURL()); $thumbnails = $summon->fetch(); } catch (\Exception $e) { } $websiteThumbnail = 'http://img.bitpixels.com/getthumbnail?code=74491&size=100&url=' . urlencode($content->url); $thumbnails['thumbnails'][] = $websiteThumbnail; Session::put('thumbnails', $thumbnails['thumbnails']); return view('content.thumbnails', compact('content', 'thumbnails')); }