public function update(FaqRequest $request, Faq $faq)
    {
        try {
            $attributes = $request->all();

            $faq->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('faq::faq.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        }

    }
public function update(FaqRequest $request, Faq $faq)
    {
        try {
            $attributes = $request->all();

            $faq->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('faq::faq.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('faq/faq/' . $faq->getRouteKey()))
                ->redirect();
        }

    }
public function update ( FaqRequest $ request , Faq $ faq ) { try { $ attributes = $ request -> all ( ) ; $ faq -> update ( $ attributes ) ; return $ this -> response -> message ( trans ( 'messages.success.updated' , [ 'Module' => trans ( 'faq::faq.name' ) ] ) ) -> code ( 204 ) -> status ( 'success' ) -> url ( guard_url ( 'faq/faq/' . $ faq -> getRouteKey ( ) ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'faq/faq/' . $ faq -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Update the faq.

@param Request $request
@param Model   $faq

@return Response
Update the faq .