/** * @param Request $request * @return Response * * @SWG\Get( * path="/ajudas", * summary="Get a listing of the Ajudas.", * tags={"Ajuda"}, * description="Get all Ajudas", * produces={"application/json"}, * @SWG\Response( * response=200, * description="successful operation", * @SWG\Schema( * type="object", * @SWG\Property( * property="success", * type="boolean" * ), * @SWG\Property( * property="data", * type="array", * @SWG\Items(ref="#/definitions/Ajuda") * ), * @SWG\Property( * property="message", * type="string" * ) * ) * ) * ) */ public function index(Request $request) { $this->ajudaRepository->pushCriteria(new RequestCriteria($request)); $this->ajudaRepository->pushCriteria(new LimitOffsetCriteria($request)); $ajudas = $this->ajudaRepository->all(); return $this->sendResponse($ajudas->toArray(), 'Ajudas retrieved successfully'); }
/** * Display a listing of the Ajuda. * * @param Request $request * @return Response */ public function index(Request $request) { $this->ajudaRepository->pushCriteria(new RequestCriteria($request)); $ajudas = $this->ajudaRepository->all(); return view('ajudas.index')->with('ajudas', $ajudas); }