category; if ($category->childrens->isEmpty() && $category->parent) { $parent = $category->parent; } return view('video.show', compact('video', 'parent', 'category')); } }