/** * Store a newly created Folio in storage. * * @param CreateFolioRequest $request * * @return Response */ public function store(CreateFolioRequest $request) { $input = $request->all(); $folio = $this->folioRepository->create($input); Flash::success('Folio saved successfully.'); return redirect(route('folios.index')); }
/** * Store a newly created Folio in storage. * POST /folios * * @param Request $request * * @return Response */ public function store(Request $request) { if (sizeof(Folio::$rules) > 0) { $this->validateRequestOrFail($request, Folio::$rules); } $input = $request->all(); $folios = $this->folioRepository->create($input); return $this->sendResponse($folios->toArray(), "Folio saved successfully"); }