Segment to filter through categories slug I've seen plenty examples of using the uri segment like below, but it ain't working for me, anyone had same sort of issue?

{% set segment = craft.request.segment(2) %}
{% set pageCats = craft.categories('photoCategories').slug('segment') %}
{% set entries = craft.assets.group('photoUpload').relatedTo(pageCats).find() %}

{% for entry in entries %}
    {{ entry.stuff }}
{% endfor %}


It works if I hard code the segment name .slug('skateboards') and the segment does render when {{ segment }} on other areas of the same page.
Try removing the ' ' from segment in line 2

e.g. 

{% set pageCats = craft.categories('photoCategories').slug(segment) %}