where('permission', $permission); } public function scopeServer($query, $server) { return $query->where('server_id', $server->id); } }