public function remove($item)
    {
        $key = $item instanceof Item ? $item->name : $item;

        if ($this->has($key)) {
            $this->forget($key);
            return true;
        }

        return false;
    }
public function remove($item)
    {
        $key = $item instanceof Item ? $item->name : $item;

        if ($this->has($key)) {
            $this->forget($key);
            return true;
        }

        return false;
    }
public function remove ( $ item ) { $ key = $ item instanceof Item ? $ item -> name : $ item ; if ( $ this -> has ( $ key ) ) { $ this -> forget ( $ key ) ; return true ; } return false ; }
Remove an item from the list

@param Item|string $item The item instance or name

@return bool Returns true if the element has been removed, false otherwise
Remove an item from the list