src/Traits/Friendly.php
public function block($model)
    {
        $deletedAtLeastOne = false;

        if ($this->friends->count()) {
            foreach ($this->friends as $friend) {
                if ($friend->getKey() == $model->id) {
                    $friend->pivot->delete();
                    $this->resetFriends();

                    $deletedAtLeastOne = true;
                }
            }
        }

        return $deletedAtLeastOne;
    }
public function block($model)
    {
        $deletedAtLeastOne = false;

        if ($this->friends->count()) {
            foreach ($this->friends as $friend) {
                if ($friend->getKey() == $model->id) {
                    $friend->pivot->delete();
                    $this->resetFriends();

                    $deletedAtLeastOne = true;
                }
            }
        }

        return $deletedAtLeastOne;
    }
public function block ( $ model ) { $ deletedAtLeastOne = false ; if ( $ this -> friends -> count ( ) ) { foreach ( $ this -> friends as $ friend ) { if ( $ friend -> getKey ( ) == $ model -> id ) { $ friend -> pivot -> delete ( ) ; $ this -> resetFriends ( ) ; $ deletedAtLeastOne = true ; } } } return $ deletedAtLeastOne ; }
Remove the connection between these two models.  AKA "block user".

@param $model
@return bool
Remove the connection between these two models . AKA block user .