public function update(AdminCupomRequest $request, $id)
 {
     $cupom = $this->repository->find($id);
     $data = $request->all();
     $this->repository->update($data, $id);
     return redirect()->route('admin.cupoms.index');
 }
Пример #2
0
 public function store(AdminCupomRequest $request)
 {
     $data = $request->all();
     $this->repository->create($data);
     return redirect()->route('admin.cupoms.index');
     //        dd($request->all());
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  AdminCupomRequest  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(AdminCupomRequest $request, $id)
 {
     $this->cupomRepository->update($request->all(), $id);
     return redirect()->route('admin.cupoms.index');
 }