Ejemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  Phone $phone
  * @return \Illuminate\Http\Response
  */
 public function update(Station $station, Phone $phone, Request $request)
 {
     $this->validate($request, $this->rules);
     //
     $input = array_except(Input::all(), '_method');
     $phone->update($input);
     return Redirect::route('stations.phones.show', [$station->slug, $phone->slug])->with('message', 'Phone updated.');
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param    \Illuminate\Http\Request  $request
  * @return  \Illuminate\Http\Response
  */
 public function update(Request $request, Phone $phone)
 {
     $this->validate($request, Phone::validationRules());
     $phone->update($request->all());
     return redirect('/phone');
 }