src/Mailing/Mailable.php
public function view($name)
    {
        $this->_view = View::make($name);

        $vars = get_object_vars($this);

        foreach ($vars as $key => $value) {
            if (!in_array($key, ['_view', '_text', '_type', '_subject', '_sender_name', '_sender_mail'])) {
                $this->_view->with($key, $value);
            }
        }

        $this->_type = 'text/html';

        return $this;
    }
public function view($name)
    {
        $this->_view = View::make($name);

        $vars = get_object_vars($this);

        foreach ($vars as $key => $value) {
            if (!in_array($key, ['_view', '_text', '_type', '_subject', '_sender_name', '_sender_mail'])) {
                $this->_view->with($key, $value);
            }
        }

        $this->_type = 'text/html';

        return $this;
    }
public function view ( $ name ) { $ this -> _view = View :: make ( $ name ) ; $ vars = get_object_vars ( $ this ) ; foreach ( $ vars as $ key => $ value ) { if ( ! in_array ( $ key , [ '_view' , '_text' , '_type' , '_subject' , '_sender_name' , '_sender_mail' ] ) ) { $ this -> _view -> with ( $ key , $ value ) ; } } $ this -> _type = 'text/html' ; return $ this ; }
Set the view.

@param string $name

@return $this
Set the view .