Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #20 from martindilling/relations-model-references
Browse files Browse the repository at this point in the history
Relationships model references
  • Loading branch information
ajthinking authored Jun 11, 2019
2 parents cb7c602 + cc27f65 commit 073209e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/templates/BelongsToManyRelationship
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/
public function ___METHOD_NAME___()
{
return $this->belongsToMany('App\___TARGET_CLASS___');
}
return $this->belongsToMany(\App\___TARGET_CLASS___::class);
}
4 changes: 2 additions & 2 deletions src/templates/BelongsToRelationship
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/
public function ___METHOD_NAME___()
{
return $this->belongsTo('App\___TARGET_CLASS___');
}
return $this->belongsTo(\App\___TARGET_CLASS___::class);
}
4 changes: 2 additions & 2 deletions src/templates/HasManyRelationship
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/
public function ___METHOD_NAME___()
{
return $this->hasMany('App\___TARGET_CLASS___');
}
return $this->hasMany(\App\___TARGET_CLASS___::class);
}
4 changes: 2 additions & 2 deletions src/templates/HasOneRelationship
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
*/
public function ___METHOD_NAME___()
{
return $this->hasOne('App\___TARGET_CLASS___');
}
return $this->hasOne(\App\___TARGET_CLASS___::class);
}

0 comments on commit 073209e

Please sign in to comment.