cleanup model relationship references
This commit is contained in:
@@ -91,9 +91,9 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function getGravatarAttribute()
|
||||
{
|
||||
$size = 80;
|
||||
$default = 'https://en.gravatar.com/userimage/12856995/7c7c1da6387853fea65ff74983055386.png';
|
||||
return 'https://www.gravatar.com/avatar/' .
|
||||
$size = config('gravatar.size');
|
||||
$default = config('gravatar.default');
|
||||
return config('gravatar.url') .
|
||||
md5(strtolower(trim($this->email))) . '?d=' . urlencode($default ) . '&s=' . $size;
|
||||
}
|
||||
|
||||
@@ -103,36 +103,36 @@ class User extends Authenticatable
|
||||
|
||||
public function airline()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Airline', 'airline_id');
|
||||
return $this->belongsTo(Airline::class, 'airline_id');
|
||||
}
|
||||
|
||||
public function home_airport()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Airport', 'home_airport_id');
|
||||
return $this->belongsTo(Airport::class, 'home_airport_id');
|
||||
}
|
||||
|
||||
public function current_airport()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Airport', 'curr_airport_id');
|
||||
return $this->belongsTo(Airport::class, 'curr_airport_id');
|
||||
}
|
||||
|
||||
public function last_pirep()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Pirep', 'last_pirep_id');
|
||||
return $this->belongsTo(Pirep::class, 'last_pirep_id');
|
||||
}
|
||||
|
||||
public function bids()
|
||||
{
|
||||
return $this->hasMany('App\Models\UserBid', 'user_id');
|
||||
return $this->hasMany(UserBid::class, 'user_id');
|
||||
}
|
||||
|
||||
public function pireps()
|
||||
{
|
||||
return $this->hasMany('App\Models\Pirep', 'user_id');
|
||||
return $this->hasMany(Pirep::class, 'user_id');
|
||||
}
|
||||
|
||||
public function rank()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Rank', 'rank_id');
|
||||
return $this->belongsTo(Rank::class, 'rank_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user