src/Hassansin/DBCart/Models/Cart.php
public function clear(){
        $this->items()->delete();
        $this->updateTimestamps();
        $this->total_price = 0;
        $this->item_count = 0;
        $this->relations = [];
        return $this->save();
    }
public function clear(){
        $this->items()->delete();
        $this->updateTimestamps();
        $this->total_price = 0;
        $this->item_count = 0;
        $this->relations = [];
        return $this->save();
    }
public function clear ( ) { $ this -> items ( ) -> delete ( ) ; $ this -> updateTimestamps ( ) ; $ this -> total_price = 0 ; $ this -> item_count = 0 ; $ this -> relations = [ ] ; return $ this -> save ( ) ; }
Empties a cart
Empties a cart