Hotfix for Layout 2 regarding display of sfw variable and other minor improvements and or changes

This commit is contained in:
noxy
2019-10-08 21:39:42 +00:00
parent 4682e65af9
commit 7ffef2472b
13 changed files with 111 additions and 28 deletions

View File

@@ -74,9 +74,14 @@ class CategoryController extends Controller
return redirect()->back()->with('error', 'Category is empty.');
}
$sfw = $video->tags->contains(function($key, $tag) {
return $tag->normalized === 'sfw';
});
return view('video', [
'video' => $video,
'related' => $category,
'related' => $category,
'sfw' => $sfw,
'banner' => Banner::getRandom($video->isSfw())]);
}