src/Actions/EmailAction.php
protected function getSubject()
    {
        // the form could contain arrays which are incompatible with the template function
        $templatableItems = array_filter($this->form->data(), function ($item) {
            return is_scalar($item);
        });

        $subject = Str::template($this->option('subject', I18n::translate('uniform-email-subject')), $templatableItems);

        // Remove newlines to prevent malicious modifications of the email header.
        return str_replace("\n", '', $subject);
    }
protected function getSubject()
    {
        // the form could contain arrays which are incompatible with the template function
        $templatableItems = array_filter($this->form->data(), function ($item) {
            return is_scalar($item);
        });

        $subject = Str::template($this->option('subject', I18n::translate('uniform-email-subject')), $templatableItems);

        // Remove newlines to prevent malicious modifications of the email header.
        return str_replace("\n", '', $subject);
    }
protected function getSubject ( ) { // the form could contain arrays which are incompatible with the template function $ templatableItems = array_filter ( $ this -> form -> data ( ) , function ( $ item ) { return is_scalar ( $ item ) ; } ) ; $ subject = Str :: template ( $ this -> option ( 'subject' , I18n :: translate ( 'uniform-email-subject' ) ) , $ templatableItems ) ; // Remove newlines to prevent malicious modifications of the email header. return str_replace ( "\n" , '' , $ subject ) ; }
Get the email subject and resolve possible template strings

@return string
Get the email subject and resolve possible template strings