Ejemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function update(Requests\category\EditFormRequest $request, $id)
 {
     $offers = categories::findorfail($id);
     if ($request->get('parent_id')) {
         $offers->name = $request->get('name');
         $offers->parent_id = $request->get('parent_id');
         $offers->short_description = $request->get('short_description');
         $offers->detail_description = $request->get('detail_description');
         $offers->is_active = $request->get('is_active');
         $offers->save();
         return redirect()->route('parent_offers/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_SUCCESS', ['message' => 'The selected offers update']));
     } else {
         return redirect()->route('parent_offers/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_WARNING', ['message' => 'Sorry something went Wrong']));
     }
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function update(Requests\category\EditFormRequest $request, $id)
 {
     $data = categories::findorfail($id);
     if ($request->get('parent_id')) {
         $data->name = $request->get('name');
         $data->parent_id = $request->get('parent_id');
         $data->short_description = $request->get('short_description');
         $data->detail_description = $request->get('detail_description');
         $data->is_active = $request->get('is_active');
         $data->save();
         return redirect()->route('parent_gift/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_SUCCESS', ['message' => 'The selected gift item update']));
     } else {
         return redirect()->route('parent_gift/list')->with('message', Lang::get('response.CUSTOM_MESSAGE_WARNING', ['message' => 'Whoops, looks like something went wrong . ']));
     }
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function EditAction($id)
 {
     $category = categories::findorfail($id);
     return view('admin/category/category_edit', compact('category'));
 }