/** * Display a listing of the Post. * * @return Response */ public function index() { $posts = $this->postRepository->all(); return view('admin.posts.index')->with('posts', $posts); }
/** * Display a listing of the Post. * GET|HEAD /posts * * @return Response */ public function index() { $posts = $this->postRepository->all(); return $this->sendResponse($posts->toArray(), "Posts retrieved successfully"); }