protected function createMessageCallback(Recipient $user, $subject = null, $callback = null)
    {
        return function (Message $message) use ($user, $subject, $callback) {
            // Set the recipient detail.
            $message->to($user->getRecipientEmail(), $user->getRecipientName());

            // Only append the subject if it was provided.
            ! empty($subject) && $message->subject($subject);

            // Run any callback if provided.
            \is_callable($callback) && $callback(...func_get_args());
        };
    }
protected function createMessageCallback(Recipient $user, $subject = null, $callback = null)
    {
        return function (Message $message) use ($user, $subject, $callback) {
            // Set the recipient detail.
            $message->to($user->getRecipientEmail(), $user->getRecipientName());

            // Only append the subject if it was provided.
            ! empty($subject) && $message->subject($subject);

            // Run any callback if provided.
            \is_callable($callback) && $callback(...func_get_args());
        };
    }
protected function createMessageCallback ( Recipient $ user , $ subject = null , $ callback = null ) { return function ( Message $ message ) use ( $ user , $ subject , $ callback ) { // Set the recipient detail. $ message -> to ( $ user -> getRecipientEmail ( ) , $ user -> getRecipientName ( ) ) ; // Only append the subject if it was provided. ! empty ( $ subject ) && $ message -> subject ( $ subject ) ; // Run any callback if provided. \ is_callable ( $ callback ) && $ callback ( ... func_get_args ( ) ) ; } ; }
Create message callback.

@param  \Orchestra\Contracts\Notification\Recipient  $user
@param  string|null  $subject
@param  callable|null  $callback

@return \Closure
Create message callback .