/** * Update the specified resource in storage. * * @param int $id * * @return Response */ public function update($id) { // Get the resource if it has not been provided by the child class if (!$this->resource->getKey()) { $this->resource = $this->resource->findOrFail($id); } // NOTE: If you override this method remember to exclude $this->relationships from input!! $input = Input::except(array_keys($this->relationships)); // Less safe, more convenient // Transfer input to the resource $this->resource = $this->resource->fill($input); return $this->persist(__FUNCTION__); }