public function syncMenuAssignment($menu, $assignment)
    {
        switch ($assignment) {
            case static::ALL_PAGES:
                $this->menus()->sync([static::ALL_PAGES]);
                break;
            case static::NO_PAGES:
                $this->menus()->detach();
                break;
            case static::SELECTED_PAGES:
                $this->menus()->sync($menu);
                break;
        }

        return $this;
    }