hasOne(UserSession::class); } public function favourites() { return $this->belongsToMany(Paste::class, 'user_favourites')->withPivot('f_time') ->whereRaw("((expiry IS NULL) OR ((expiry != 'SELF') AND (expiry > NOW())))"); } public function pastes() { return $this->hasMany(Paste::class) ->whereRaw("((expiry IS NULL) OR ((expiry != 'SELF') AND (expiry > NOW())))"); } public function badges() { return $this->hasMany(Badge::class); } }