<?php

namespace App\Traits;

trait AppendAttributesTrait
{
    public function appendAttributes($attributes = null)
    {
        if (!$attributes) {
            $attributes = $this->append_attributes;
        }

        if (!is_array($attributes) && $attributes) {
            $attributes = [$attributes];
        }

        if (is_array($attributes)) {
            $this->append($attributes);
        }
        return $this;
    }
}
