public function update(NoteRequest $request, $id, $noteId)
    {
        $note = $this->inventory->updateNote($request, $id, $noteId);

        if ($note) {
            $message = 'Successfully updated note.';

            return redirect()->route('maintenance.inventory.notes.show', [$id, $noteId])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this note. Please try again.';

            return redirect()->route('maintenance.inventory.notes.update', [$id, $noteId])->withErrors($message);
        }
    }
public function update(NoteRequest $request, $id, $noteId)
    {
        $note = $this->inventory->updateNote($request, $id, $noteId);

        if ($note) {
            $message = 'Successfully updated note.';

            return redirect()->route('maintenance.inventory.notes.show', [$id, $noteId])->withSuccess($message);
        } else {
            $message = 'There was an issue updating this note. Please try again.';

            return redirect()->route('maintenance.inventory.notes.update', [$id, $noteId])->withErrors($message);
        }
    }
public function update ( NoteRequest $ request , $ id , $ noteId ) { $ note = $ this -> inventory -> updateNote ( $ request , $ id , $ noteId ) ; if ( $ note ) { $ message = 'Successfully updated note.' ; return redirect ( ) -> route ( 'maintenance.inventory.notes.show' , [ $ id , $ noteId ] ) -> withSuccess ( $ message ) ; } else { $ message = 'There was an issue updating this note. Please try again.' ; return redirect ( ) -> route ( 'maintenance.inventory.notes.update' , [ $ id , $ noteId ] ) -> withErrors ( $ message ) ; } }
Updates the specified note for the specified inventory.

@param NoteRequest $request
@param int|string  $id
@param int|string  $noteId

@return \Illuminate\Http\RedirectResponse
Updates the specified note for the specified inventory .