dimanche 15 juillet 2018

BadMethodCallException Method Illuminate\Database\Query\Builder::merge does not exist

getting BadMethodCallException, Method Illuminate\Database\Query\Builder::merge does not exist. when trying to execute the following

public function getFriends1()
{
    return $this->belongsToMany('App\Friend', 'friends', 'user_id', 'friend_id');
}

public function getFriends2()
{
    return $this->belongsToMany('App\Friend', 'friends', 'friend_id', 'user_id');
}

public function getFriends()
{
    return $this->getFriends1()->merge($this->getFriends2());
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire