/** * Display a listing of the Category. * GET|HEAD /categories * * @return Response */ public function index() { $categories = $this->categoryRepository->all(); header("Access-Control-Allow-Origin:" . $this->clientURL); return $this->sendResponse($categories, "Categories retrieved successfully"); }
/** * Display a listing of the resource. * * @return Response */ public function home() { $categories = $this->categoryRepository->all(); return view('home', compact('categories')); }
/** * Display a listing of the Category. * GET|HEAD /categories * * @return Response */ public function index() { $categories = $this->categoryRepository->all(); return $this->sendResponse($categories->toArray(), "Categories retrieved successfully"); }