diff --git a/Eloquent/Builder.php b/Eloquent/Builder.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Builder.php
+++ b/Eloquent/Builder.php
@@ -1237,6 +1237,19 @@ class Builder
     }
 
     /**
+     * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
+     *
+     * @param  mixed  $relations
+     * @return $this
+     */
+    public function withOnly($relations)
+    {
+        $this->eagerLoad = [];
+
+        return $this->with($relations);
+    }
+
+    /**
      * Create a new instance of the model being queried.
      *
      * @param  array  $attributes
[8.x] Add withOnly method  (#<I>)

* Added in new withOnly method + tests



* Refactored function



* Update Builder.php