/** * Deletes the specified note attached to the specified inventory. * * @param int|string $id * @param int|string $noteId * * @return \Illuminate\Http\RedirectResponse */ public function destroy($id, $noteId) { if ($this->inventory->deleteNote($id, $noteId)) { $message = 'Successfully updated note.'; return redirect()->route('maintenance.inventory.show', [$id])->withSuccess($message); } else { $message = 'There was an issue deleting this note. Please try again.'; return redirect()->route('maintenance.inventory.notes.show', [$id, $noteId])->withErrors($message); } }