public function indexTypes()
 {
     $company = Auth::user()->company;
     $parents = Category::get();
     $categories = $parents->toTree();
     $dep = '-';
     return view('account.settings.work.types')->with(compact('categories', 'parents', 'dep', 'company'));
 }
 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $categories = PrsoCategory::withDepth()->having('depth', '=', 0)->get()->toTree();
     $subHeadsCategories = PrsoCategory::get()->toTree();
     return view('welcome')->with(compact(['categories', 'subHeadsCategories']));
 }
 /**
  *
  * Displaying index category page
  *
  * @return $this
  */
 public function index()
 {
     $parents = Category::get();
     $categories = $parents->toTree();
     return view('adminpanel.categories.index')->with(compact('categories', 'parents'));
 }