src/FCMMessage.php
public function notification($notification = null)
    {
        if (is_array($notification)) {
            if ($this->notification && $this->notification instanceof PayloadNotification) {
                $notification = array_merge($this->notification->toArray(), $notification);
            }
            $builder = new PayloadNotificationBuilder();
            $notification = static::populateBuilder($builder, static::NOTIFICATION_MAP, $notification);
        }
        if ($notification instanceof PayloadNotification) {
            $this->notification = $notification;
        } elseif ($notification instanceof PayloadNotificationBuilder) {
            $this->notification = $notification->build();
        } elseif (! is_null($notification)) {
            throw static::makeInvalidArgumentException(
                $notification,
                'notification',
                PayloadNotification::class,
                PayloadNotificationBuilder::class
            );
        }

        return $this;
    }
public function notification($notification = null)
    {
        if (is_array($notification)) {
            if ($this->notification && $this->notification instanceof PayloadNotification) {
                $notification = array_merge($this->notification->toArray(), $notification);
            }
            $builder = new PayloadNotificationBuilder();
            $notification = static::populateBuilder($builder, static::NOTIFICATION_MAP, $notification);
        }
        if ($notification instanceof PayloadNotification) {
            $this->notification = $notification;
        } elseif ($notification instanceof PayloadNotificationBuilder) {
            $this->notification = $notification->build();
        } elseif (! is_null($notification)) {
            throw static::makeInvalidArgumentException(
                $notification,
                'notification',
                PayloadNotification::class,
                PayloadNotificationBuilder::class
            );
        }

        return $this;
    }
Set Notification.

@param  mixed $notification
@return $this