File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,18 @@ trait RelationshipTrait
3434 */
3535 abstract public function getKeyedRelationships ();
3636
37+ /**
38+ * @param $key
39+ * @param $typeOrTypes
40+ * @param array $options
41+ * @return $this
42+ * @deprecated use `hasOne` instead
43+ */
44+ public function belongsTo ($ key , $ typeOrTypes , array $ options = [])
45+ {
46+ return $ this ->hasOne ($ key , $ typeOrTypes , $ options );
47+ }
48+
3749 /**
3850 * Helper method to add a belongs to validator for the specified key.
3951 *
@@ -42,7 +54,7 @@ abstract public function getKeyedRelationships();
4254 * @param array $options
4355 * @return $this
4456 */
45- public function belongsTo ($ key , $ typeOrTypes , array $ options = [])
57+ public function hasOne ($ key , $ typeOrTypes , array $ options = [])
4658 {
4759 $ relationships = $ this ->getKeyedRelationships ();
4860
You can’t perform that action at this time.
0 commit comments