Implement the other functionality for awards #154

This commit is contained in:
Nabeel Shahzad
2018-03-17 00:18:03 -05:00
parent 45a22e26be
commit 31b9195a6e
5 changed files with 76 additions and 29 deletions

View File

@@ -147,6 +147,11 @@ class User extends Authenticatable
return $this->belongsTo(Airline::class, 'airline_id');
}
public function awards()
{
return $this->hasMany(UserAward::class, 'user_id');
}
public function home_airport()
{
return $this->belongsTo(Airport::class, 'home_airport_id');