File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function testMysqlRelations()
45
45
$ user = MysqlUser::find ($ user ->id ); // refetch
46
46
$ this ->assertEquals ('admin ' , $ user ->role ->type );
47
47
48
- // MongoDB beelongs to
48
+ // MongoDB belongs to
49
49
$ role = $ user ->role ()->first (); // refetch
50
50
$ this ->assertEquals ('John Doe ' , $ role ->mysqlUser ->name );
51
51
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public function user()
16
16
17
17
public function mysqlUser ()
18
18
{
19
- return $ this ->belongsTo ('MysqlUser ' , ' role_id ' );
19
+ return $ this ->belongsTo ('MysqlUser ' );
20
20
}
21
21
22
22
/**
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public function books()
16
16
17
17
public function role ()
18
18
{
19
- return $ this ->hasOne ('Role ' , ' role_id ' );
19
+ return $ this ->hasOne ('Role ' );
20
20
}
21
21
22
22
/**
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public function user()
14
14
15
15
public function mysqlUser ()
16
16
{
17
- return $ this ->belongsTo ('MysqlUser ' , ' role_id ' );
17
+ return $ this ->belongsTo ('MysqlUser ' );
18
18
}
19
19
20
20
}
You can’t perform that action at this time.
0 commit comments