public function updateCrud(UpdateRequest $request = null)
	{
		// if edit_permission is false, abort
		if (isset($this->crud['edit_permission']) && !$this->crud['edit_permission']) {
			abort(403, 'Not allowed.');
		}

		$model = $this->crud['model'];
		$this->prepareFields($model::find(\Request::input('id')));

		$item = $model::find(\Request::input('id'))
						->update($this->compactFakeFields(\Request::all()));

		// if it's a relationship with a pivot table, also sync that
		foreach ($this->crud['fields'] as $k => $field) {
			if (isset($field['pivot']) && $field['pivot']==true && \Request::has($field['name']))
			{
				$model::find(\Request::input('id'))->$field['name']()->sync(\Request::input($field['name']));
			}
		}

		// show a success message
		\Alert::success(trans('crud.update_success'))->flash();

		return \Redirect::to($this->crud['route']);
	}