+ public function getRandomQuoteAttribute() {
+ return $this->results()
+ ->where('comment', '!=', '')
+ ->whereHas('round', function(Builder $query) {
+ $query->where('locked', true);
+ })
+ ->inRandomOrder()
+ ->first();
+ }
+
+
+ public function hasGlobalRole($name) {
+ return !empty($this->global_roles) && in_array($name, $this->global_roles);
+ }