public function getRecipientsAttribute()
    {
        $recipients = new Collection();

        if (array_key_exists('recipients', $this->attributes)) {
            foreach ((array) $this->attributes['recipients'] as $recipient) {
                $recipients->push($this->factory->create(User::class, $recipient, true));
            }
        }

        return $recipients;
    }
public function getRecipientsAttribute()
    {
        $recipients = new Collection();

        if (array_key_exists('recipients', $this->attributes)) {
            foreach ((array) $this->attributes['recipients'] as $recipient) {
                $recipients->push($this->factory->create(User::class, $recipient, true));
            }
        }

        return $recipients;
    }
public function getRecipientsAttribute ( ) { $ recipients = new Collection ( ) ; if ( array_key_exists ( 'recipients' , $ this -> attributes ) ) { foreach ( ( array ) $ this -> attributes [ 'recipients' ] as $ recipient ) { $ recipients -> push ( $ this -> factory -> create ( User :: class , $ recipient , true ) ) ; } } return $ recipients ; }
Gets the recipients attribute.

@return Collection A collection of recepients.
Gets the recipients attribute .