public function setSlidesAttribute($slides)
    {
        foreach ($slides as &$slide) {
            if (!$slide instanceof Slideshow\Slide) {
                $slide['url'] = (isset($slide['page']) && $slide['page'] > 0) ?
                    $slide['page']
                    : isset($slide['url']) ? $slide['url'] : null;

                unset($slide['page']);

                if (isset($slide['asset']) && is_array($slide['asset'])) {
                    $slide['asset_id'] = $slide['asset']['id'];
                    unset($slide['asset']);
                }

                $slide = new Slideshow\Slide($slide);
            }
        }

        $this->created(function () use ($slides) {
            $this->slides()->saveMany($slides);
        });
    }