public function postUnwatch(Request $request)
    {
        $item = Item::findOrFail($request->input('item_id'));

        if (!Auth::user()->watching->contains($item)) {
            return redirect()->back()->withErrors(["You aren't watching this item."]);
        }

        Auth::user()->watching()->detach($item);

        return redirect()->back()->withStatus($item->name.' has been removed from your watched items.');
    }
public function postUnwatch(Request $request)
    {
        $item = Item::findOrFail($request->input('item_id'));

        if (!Auth::user()->watching->contains($item)) {
            return redirect()->back()->withErrors(["You aren't watching this item."]);
        }

        Auth::user()->watching()->detach($item);

        return redirect()->back()->withStatus($item->name.' has been removed from your watched items.');
    }
public function postUnwatch ( Request $ request ) { $ item = Item :: findOrFail ( $ request -> input ( 'item_id' ) ) ; if ( ! Auth :: user ( ) -> watching -> contains ( $ item ) ) { return redirect ( ) -> back ( ) -> withErrors ( [ "You aren't watching this item." ] ) ; } Auth :: user ( ) -> watching ( ) -> detach ( $ item ) ; return redirect ( ) -> back ( ) -> withStatus ( $ item -> name . ' has been removed from your watched items.' ) ; }
Unwatch an item.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\RedirectResponse
Unwatch an item .