Пример #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Section $sections, Request $request)
 {
     //
     $section = $request->all();
     unset($section['_token']);
     $sections['created_by'] = \Auth::user()->id;
     $sections['updated_by'] = \Auth::user()->id;
     $sections['is_active'] = 1;
     $sections->whereId(Input::get('id'))->update($section);
     return Redirect::route('sections.index');
 }