File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,17 @@ class Answer extends Model
1313
1414 public function user ()
1515 {
16- return $ this ->belongsTo (' App\ User' );
16+ return $ this ->belongsTo (User::class );
1717 }
1818
1919 public function question ()
2020 {
21- return $ this ->belongsTo (' App\ Question' );
21+ return $ this ->belongsTo (Question::class );
2222 }
2323
2424 public function votes ()
2525 {
26- return $ this ->hasMany (' App\ Vote' );
26+ return $ this ->hasMany (Vote::class );
2727 }
2828
2929 /**
Original file line number Diff line number Diff line change @@ -14,19 +14,19 @@ class Question extends Model
1414 // Create the relationship to users
1515 public function user ()
1616 {
17- return $ this ->belongsTo (' App\ User' );
17+ return $ this ->belongsTo (User::class );
1818 }
1919
2020 // Create the relationship to answers
2121 public function answers ()
2222 {
23- return $ this ->hasMany (' App\ Answer' );
23+ return $ this ->hasMany (Answer::class );
2424 }
2525
2626 // Create the relationship to votes
2727 public function votes ()
2828 {
29- return $ this ->hasMany (' App\ Vote' );
29+ return $ this ->hasMany (Vote::class );
3030 }
3131
3232 // Using a relationship table or a 'pivot' table.
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ class Vote extends Model
2424
2525 public function user ()
2626 {
27- return $ this ->belongsTo (' App\ User' );
27+ return $ this ->belongsTo (User::class );
2828 }
2929
3030 public function answer ()
3131 {
32- return $ this ->belongsTo (' App\ Answer' );
32+ return $ this ->belongsTo (Answer::class );
3333 }
3434
3535 /**
You can’t perform that action at this time.
0 commit comments