Skip to content

Commit

Permalink
Add relationship here.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeltzer committed Nov 20, 2016
1 parent c5cc59d commit 90da51a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Models/Manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public function assets()
return $this->hasManyThrough('\App\Models\Asset', '\App\Models\AssetModel', 'manufacturer_id', 'model_id');
}

public function models()
{
return $this->hasMany('\App\Models\AssetModel', 'manufacturer_id');
}

public function licenses()
{
return $this->hasMany('\App\Models\License', 'manufacturer_id');
Expand Down

0 comments on commit 90da51a

Please sign in to comment.