Example #1
0
 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function index()
 {
     $categoriesObj = Category::all();
     $categoriesArr = Category::getCategoriesArr($categoriesObj);
     $parentChildArr = CategoryParentAndChildren::getHierarchy();
     return view('welcome', compact('categoriesObj', 'parentChildArr', 'categoriesArr'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Category $category)
 {
     $categoriesObj = $category->all();
     $categoriesArr = $category->getCategoriesArr($categoriesObj);
     $parentChildArr = $this->categoryPAndCObj->getHierarchy();
     return view('categories.index', compact('categoriesObj', 'parentChildArr', 'categoriesArr'));
 }
Example #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(Member $memberObj)
 {
     $memberSocialIdArr = Member::getMemberSocialIdArr($memberObj->id);
     $parentChildArr = CategoryParentAndChildren::getHierarchy();
     $categoriesArr = Category::getCategoriesArr();
     $memberCategoryIdArr = Member::getMemberCategoryIdArr($memberObj->id);
     return view('members.edit', compact('memberObj', 'memberSocialIdArr', 'parentChildArr', 'memberCategoryIdArr', 'categoriesArr'));
 }
 /**
  * List of categories in parent - child hierarchy
  * 
  * @return Response
  */
 public function categorylist()
 {
     $categoryPAndCObj = new \App\CategoryParentAndChildren();
     $category = new \App\Category();
     $categoriesObj = $category->all();
     $categoriesArr = $category->getCategoriesArr($categoriesObj);
     $parentChildArr = $categoryPAndCObj->getHierarchy();
     return view('socialmedia.categorylist', compact('categoriesObj', 'parentChildArr', 'categoriesArr'));
 }