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