heesel

ErrorException: Attempt to read property on null

laravel Icon

ErrorException

Attempt to read property on null

An unhandled exception occurred on line 682
679
                      <tr>
680
                        <td class="column_cell px py_md text_dark text_center" style="vertical-align: top;color: #333333;text-align: center;padding-top: 32px;padding-bottom: 32px;padding-left: 16px;padding-right: 16px;-webkit-text-size-adjust: 100%;-
681
                          <h2 class="mt_md mb_xs" style="color: inherit;font-family: Arial, Helvetica, sans-serif;margin-top: 32px;margin-bottom: 8px;word-break: break-word;font-size: 28px;line-height: 38px;font-weight: bold;">Welcome to Newsite.io</
682
                          <p class="text_lead text_secondary mb_md" style="color: #959ba0;font-family: Arial, Helvetica, sans-serif;margin-top: 0px;margin-bottom: 32px;word-break: break-word;font-size: 19px;line-height: 31px;">Thanks for joining the
683
                          <table role="presentation" class="ebutton" align="center" border="0" cellspacing="0" cellpadding="0" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0 auto
684
                            <tbody>

Solution

I tried to send the username in an email. There for i had to do $this->user = $user; in my constructor of the WelcomeMail class but instead i did $this->$user = $user; That caused the error 'Attempt to read property username on null'.            
Apr 06, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Laravel errors.

Chrome logo Add to Chrome - It's free