/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(Request $request, $id) { $validation = Vendor::validate(Input::all()); if ($validation->fails()) { return back()->with("errors", $validation->messages()->all())->withInput(); } $vendor = Vendor::store($request, $id); if ($vendor) { $notification[] = array('type' => 'success', 'message' => Lang::get('notification.edit_success')); } else { $notification[] = array('type' => 'failure', 'message' => Lang::get('notification.edit_failure')); } Session::flash('notification', $notification); return back(); }